src/common/auth/services/auth.service.ts
Methods |
constructor()
|
|
Defined in src/common/auth/services/auth.service.ts:4
|
| getAuthenticatedUser | ||||
getAuthenticatedUser(context)
|
||||
|
Defined in src/common/auth/services/auth.service.ts:7
|
||||
|
Parameters :
Returns :
any
|
import { Injectable } from "@nestjs/common";
@Injectable()
export class AuthService {
constructor() {}
getAuthenticatedUser(context) {
const { user } = context.switchToHttp().getRequest();
return user;
}
}