mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 22:01:09 +02:00
🐛 fix(gifts): fix userId undefined - guard used userId but controller expected sub
This commit is contained in:
parent
ec8395858b
commit
670073e3c2
1 changed files with 2 additions and 0 deletions
|
|
@ -57,7 +57,9 @@ export class JwtAuthGuard implements CanActivate {
|
|||
this.logger.debug('Token verification successful', { userId: payload.sub });
|
||||
|
||||
// Attach user to request
|
||||
// Include both 'sub' and 'userId' for compatibility with different controllers
|
||||
request.user = {
|
||||
sub: payload.sub,
|
||||
userId: payload.sub,
|
||||
email: payload.email as string,
|
||||
role: payload.role as string,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue