Skip to content

Conversation

@laxman-aqw
Copy link
Collaborator

@laxman-aqw laxman-aqw commented Oct 13, 2025

  • Added guard to update user full name
  • Added Email messages
  • Added interfaces for JWT payload
  • Added UpdateUserRequestData


@HttpCode(HttpStatus.OK)
@Post(':id')
@UseGuards(UserGuard)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if guard applies not only to this route and applies globally then you can add this above controller decorator

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure! thanks!

}

@HttpCode(HttpStatus.OK)
@Post(':id')

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Post for update ? Shouldn't it be PATCH or PUT

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

@HttpCode(HttpStatus.CREATED)
@Post()
async createUser(@Body() body: SignupRequestData) {
return this.UserService.create(body);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if UserService is a class , shouldn't it be instantiated before using it within a constructor ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! The variable name was incorrectly capitalized. I’ve updated it to userService

Comment on lines 35 to 40
if (error instanceof Error) {
throw new UnauthorizedException(error.message);
}

throw new UnauthorizedException('Session expired! Please sign in');
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this intentional ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes i thought i could handle like that! updated it to just return false

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

already removed try catch in branch behind

@laxman-aqw laxman-aqw changed the base branch from feat-login to develop November 6, 2025 06:30
@laxman-aqw laxman-aqw closed this Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants