Skip to content

Commit

Permalink
message changes for validateAndRegister
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuvinay89 committed Jan 28, 2025
1 parent 18e3f58 commit 38498ce
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
10 changes: 5 additions & 5 deletions src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ export class AuthController {
@Post('/validateAndRegister')
@UseGuards(JwtAuthGuard)
@ApiBasicAuth("access-token")
@ApiOperation({ summary: 'Signup or Signin with Google' })
@ApiResponse({ status: 200, description: 'User signed in successfully' })
@ApiResponse({ status: 201, description: 'User signed up successfully' })
async signUpAndSignIn(
@ApiOperation({ summary: 'validate And Register with Google' })
@ApiResponse({ status: 200, description: 'User Validated successfully' })
@ApiResponse({ status: 201, description: 'User Registered successfully' })
async validateAndRegister(
@Req() request: Request,
@Res() response: Response
) {
return this.authService.signUpAndSignIn(request, response);
return this.authService.validateAndRegister(request, response);
}

@UseFilters(new AllExceptionsFilter(APIID.USER_AUTH))
Expand Down
8 changes: 4 additions & 4 deletions src/auth/auth.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class AuthService {
private userRepository: Repository<User>,
) { }

async signUpAndSignIn(request :Request,response: Response) {
async validateAndRegister(request :Request,response: Response) {
const decoded :any = jwt_decode(request.headers.authorization);
const userCreateDto = new UserCreateDto({
userId: decoded.sub,
Expand All @@ -52,9 +52,9 @@ export class AuthService {
return APIResponse.success(
response,
APIID.GOOGLE_SIGNIN,
'User signed in successfully',
'User validated successfully',
HttpStatus.OK,
'User signed in successfully'
'User validated successfully'
);
}
else {
Expand All @@ -64,7 +64,7 @@ export class AuthService {
APIID.GOOGLE_SIGNUP,
createUserDB,
HttpStatus.CREATED,
'User Signed Up successfully'
'User Registered successfully'
);
}

Expand Down

0 comments on commit 38498ce

Please sign in to comment.