Spaces:
Sleeping
Sleeping
Merge pull request #55 from PBL6-team-CATS/feature/update-user
Browse files
backend/src/modules/user/user.service.ts
CHANGED
@@ -56,7 +56,7 @@ export class UserService {
|
|
56 |
}
|
57 |
await UserEntity.save(user);
|
58 |
|
59 |
-
const payload = { sub: user.id, username: user.full_name,
|
60 |
const token = await this.jwtService.signAsync(payload)
|
61 |
return {
|
62 |
access_token: token
|
|
|
56 |
}
|
57 |
await UserEntity.save(user);
|
58 |
|
59 |
+
const payload = { sub: user.id, username: user.full_name, role: user.role };
|
60 |
const token = await this.jwtService.signAsync(payload)
|
61 |
return {
|
62 |
access_token: token
|