when i console.log the req in the middleware there is no user{} in the req
@Injectable()
export class MyMiddleware implements NestMiddleware {
use(req: Request, res: Response, next: NextFunction) {
console.log(req);
next();
}
}
but when i console.log the req on an endpoint there is one
@Get('me')
async getMe(@Req() req: Request) {
console.log(req)
const res = await this.operatorService.findOneAndPopulate(
(req['user'] as any)._id,
);
return res;
}
so when does nestjs exactly add the user{} that i catch it and manipulate bevor the controller