Skip to content

Commit

Permalink
fix: update validateUser function response to return user
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeyAlmighty committed Sep 2, 2024
1 parent 31a4550 commit 99bab2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/users/users.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export class UsersService {
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const { password: _, ...user } = userFromDB;
return this.jwtService.sign(user);
return {
accessToken: this.jwtService.sign(user),
...user,
name: user.username,
};
}

/**
Expand Down

0 comments on commit 99bab2f

Please sign in to comment.