add swagger doc
This commit is contained in:
parent
f026c14f0c
commit
37bd1624cc
1 changed files with 18 additions and 0 deletions
|
|
@ -130,6 +130,12 @@ export class AuthController {
|
||||||
return await this.authService.refreshToken(body.refreshToken);
|
return await this.authService.refreshToken(body.refreshToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset password request
|
||||||
|
* @summary Request a password reset
|
||||||
|
* @param body Email address
|
||||||
|
* @returns Success message
|
||||||
|
*/
|
||||||
@Post('reset-request')
|
@Post('reset-request')
|
||||||
@SuccessResponse('200', 'Reset request successful')
|
@SuccessResponse('200', 'Reset request successful')
|
||||||
@Response('401', 'Invalid or expired refresh token')
|
@Response('401', 'Invalid or expired refresh token')
|
||||||
|
|
@ -141,6 +147,12 @@ export class AuthController {
|
||||||
return await this.authService.resetRequest(body.email);
|
return await this.authService.resetRequest(body.email);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reset password
|
||||||
|
* @summary Reset password using reset token
|
||||||
|
* @param body Reset token and new password
|
||||||
|
* @returns Success message
|
||||||
|
*/
|
||||||
@Post('reset-password')
|
@Post('reset-password')
|
||||||
@SuccessResponse('200', 'Password reset successful')
|
@SuccessResponse('200', 'Password reset successful')
|
||||||
@Response('401', 'Invalid or expired reset token')
|
@Response('401', 'Invalid or expired reset token')
|
||||||
|
|
@ -152,6 +164,12 @@ export class AuthController {
|
||||||
return await this.authService.resetPassword(body.id, body.token, body.password);
|
return await this.authService.resetPassword(body.id, body.token, body.password);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Change password
|
||||||
|
* @summary Change password using old password
|
||||||
|
* @param body User ID, old password and new password
|
||||||
|
* @returns Success message
|
||||||
|
*/
|
||||||
@Post('change-password')
|
@Post('change-password')
|
||||||
@Security('jwt')
|
@Security('jwt')
|
||||||
@SuccessResponse('200', 'Password changed successfully')
|
@SuccessResponse('200', 'Password changed successfully')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue