mirror of https://github.com/wg-easy/wg-easy
5 changed files with 3 additions and 39 deletions
@ -1,12 +0,0 @@ |
|||||
export default defineEventHandler(async (event) => { |
|
||||
const { clientId } = await getValidatedRouterParams( |
|
||||
event, |
|
||||
validateZod(clientIdType) |
|
||||
); |
|
||||
const { address4 } = await readValidatedBody( |
|
||||
event, |
|
||||
validateZod(address4Type) |
|
||||
); |
|
||||
await WireGuard.updateClientAddress({ clientId, address4 }); |
|
||||
return { success: true }; |
|
||||
}); |
|
@ -1,15 +0,0 @@ |
|||||
export default defineEventHandler(async (event) => { |
|
||||
const { clientId } = await getValidatedRouterParams( |
|
||||
event, |
|
||||
validateZod(clientIdType) |
|
||||
); |
|
||||
const { expireDate } = await readValidatedBody( |
|
||||
event, |
|
||||
validateZod(expireDateType) |
|
||||
); |
|
||||
await WireGuard.updateClientExpireDate({ |
|
||||
clientId, |
|
||||
expireDate, |
|
||||
}); |
|
||||
return { success: true }; |
|
||||
}); |
|
@ -1,9 +0,0 @@ |
|||||
export default defineEventHandler(async (event) => { |
|
||||
const { clientId } = await getValidatedRouterParams( |
|
||||
event, |
|
||||
validateZod(clientIdType) |
|
||||
); |
|
||||
const { name } = await readValidatedBody(event, validateZod(nameType)); |
|
||||
await WireGuard.updateClientName({ clientId, name }); |
|
||||
return { success: true }; |
|
||||
}); |
|
Loading…
Reference in new issue