Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Swagger documentation for user management. #55

Merged
merged 1 commit into from
Nov 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions brints-estate-api/src/users/users.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ export class UsersController {
};
}

@ApiOperation({
summary: 'Forgot password endpoint.',
})
@Post('forgot-password')
@Auth(AuthType.None)
@HttpCode(HttpStatus.OK)
Expand All @@ -122,6 +125,9 @@ export class UsersController {
};
}

@ApiOperation({
summary: 'Resend new OTP after expiration.',
})
@Post('resend-otp')
@Auth(AuthType.None)
@HttpCode(HttpStatus.OK)
Expand All @@ -136,6 +142,9 @@ export class UsersController {
};
}

@ApiOperation({
summary: 'Resend token to email address after expiration.',
})
@Post('resend-token')
@Auth(AuthType.None)
@HttpCode(HttpStatus.OK)
Expand All @@ -155,6 +164,9 @@ export class UsersController {
}

@ApiBearerAuth('access-token')
@ApiOperation({
summary: 'Change user Password. User must be authenticated.',
})
@Post('change-password')
@HttpCode(HttpStatus.OK)
@UseFilters(HttpExceptionFilter)
Expand All @@ -176,7 +188,7 @@ export class UsersController {

@ApiBearerAuth('access-token')
@ApiOperation({
summary: 'Get user profile.',
summary: 'Get user profile. User must be authenticated',
})
@Get('/:id')
@Auth(AuthType.Bearer)
Expand All @@ -199,6 +211,9 @@ export class UsersController {
};
}

@ApiOperation({
summary: 'Reset forgotten password.',
})
@Post('/reset-password/:email/:token')
@Auth(AuthType.None)
@UseInterceptors(ClassSerializerInterceptor)
Expand All @@ -221,7 +236,7 @@ export class UsersController {

@ApiBearerAuth('access-token')
@ApiOperation({
summary: 'Updates user details.',
summary: 'Update use details. User must be authenticated.',
})
@ApiResponse({
status: HttpStatus.OK,
Expand Down
Loading