wingsman2
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
10 additions and
2 deletions
-
src/www/js/api.js
|
|
|
@ -72,11 +72,11 @@ class API { |
|
|
|
}))); |
|
|
|
} |
|
|
|
|
|
|
|
async createClient({ name }) { |
|
|
|
async createClient({ name, allowedGWIPs }) { |
|
|
|
return this.call({ |
|
|
|
method: 'post', |
|
|
|
path: '/wireguard/client', |
|
|
|
body: { name }, |
|
|
|
body: { name, allowedGWIPs }, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
@ -117,4 +117,12 @@ class API { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
async updateClientAllowIPS({ clientId, allowedGWIPs }) { |
|
|
|
return this.call({ |
|
|
|
method: 'put', |
|
|
|
path: `/wireguard/client/${clientId}/allowedGWIPs/`, |
|
|
|
body: { allowedGWIPs }, |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|