You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
305 B
9 lines
305 B
import { createParamDecorator, type ExecutionContext } from '@nestjs/common'
|
|
import { type Profile } from 'passport-42'
|
|
|
|
export const Profile42 = createParamDecorator(
|
|
(data: unknown, ctx: ExecutionContext): Profile => {
|
|
const request = ctx.switchToHttp().getRequest()
|
|
return request.user
|
|
}
|
|
)
|
|
|