Wiki with step-by-step explained strategy on how to: create app (front+back+infra), 42auth, 2FA and more..
2
stars
0
forks
source link
error TS2345: Argument of type 'Request' is not assignable to parameter of type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'. #19
I am trying to pass my Req and my Res element to my getToken() function but got this error:
backend_nestjs | src/auth/auth.controller.ts:36:49 - error TS2345: Argument of type 'Request' is not assignable to parameter of type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>'.
backend_nestjs | Type 'Request' is missing the following properties from type 'Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>': get, header, accepts, acceptsCharsets, and 83 more.
backend_nestjs |
backend_nestjs | 36 const token = await this.authService.getToken(req, res);
I am trying to pass my Req and my Res element to my getToken() function but got this error:
Here is my function inside my auth.controller.ts:
Inside my auth.service.ts: