As a promise, so, Is redundant to return await this.authService.login(req.user); since internally Nestjs will await the login function anyway, so if you return another async function from it, it will be internally awaited
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey Ghislain. Nestjs handles
async login(@Request() req) {
return this.authService.login(req.user);
}
As a promise, so, Is redundant to
return await this.authService.login(req.user);
since internally Nestjs willawait
thelogin
function anyway, so if you return another async function from it, it will be internallyawaited