Browse Source

Update api.js

pull/400/head
wingsman2 4 years ago
committed by GitHub
parent
commit
6137c9493f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      src/www/js/api.js

12
src/www/js/api.js

@ -72,11 +72,11 @@ class API {
}))); })));
} }
async createClient({ name }) { async createClient({ name, allowedGWIPs }) {
return this.call({ return this.call({
method: 'post', method: 'post',
path: '/wireguard/client', 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 },
});
}
} }

Loading…
Cancel
Save