Skip to content

Commit

Permalink
docs: Swagger documentation for user management.
Browse files Browse the repository at this point in the history
  • Loading branch information
aniebietafia committed Nov 8, 2024
1 parent 87bffa0 commit 59d2fcf
Showing 1 changed file with 17 additions and 2 deletions.
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

0 comments on commit 59d2fcf

Please sign in to comment.