import { createParamDecorator, ExecutionContext } from '@nestjs/common';
export const User = createParamDecorator(
(data: unknown, ctx: ExecutionContext) => {
const request = ctx.switchToHttp().getRequest();
return request.user;
},
);
kakaoLoginCallback(@User() user) {
const {
profile: { id, username },
token: { accessToken, refreshToken },
} = user;