add swagger doc

This commit is contained in:
JakkrapartXD 2026-01-13 03:48:49 +00:00
parent f026c14f0c
commit 37bd1624cc

View file

@ -130,6 +130,12 @@ export class AuthController {
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')
@SuccessResponse('200', 'Reset request successful')
@Response('401', 'Invalid or expired refresh token')
@ -141,6 +147,12 @@ export class AuthController {
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')
@SuccessResponse('200', 'Password reset successful')
@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);
}
/**
* Change password
* @summary Change password using old password
* @param body User ID, old password and new password
* @returns Success message
*/
@Post('change-password')
@Security('jwt')
@SuccessResponse('200', 'Password changed successfully')