Skip to content

Commit 1a62f99

Browse files
committed
Fix types
1 parent 8a12a00 commit 1a62f99

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

src/main.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@ async function bootstrap() {
2828
app.use(passport.session())
2929

3030
// Swagger
31-
const options = new DocumentBuilder()
32-
.setTitle('Hangman API')
33-
.setDescription('')
34-
.setVersion('0.0.1')
35-
.build()
31+
const options = new DocumentBuilder().setTitle('Hangman API').setDescription('').setVersion('0.0.1').build()
3632
const document = SwaggerModule.createDocument(app, options)
3733
SwaggerModule.setup('api', app, document)
3834

src/modules/auth/auth.service.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ export class AuthService {
2929
}
3030

3131
const payload: JwtPayload = {
32-
// TODO: Solve type.
33-
sub: (user as any)._id,
32+
sub: user._id,
3433
fullName: `${user.firstName}`,
3534
email: user.email
3635
}

src/modules/users/users.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class UsersService {
2121
return from(this.userModel.findById(id, proyection).lean())
2222
}
2323

24-
findByEmail(email: string): Observable<User> {
24+
findByEmail(email: string): Observable<User & { _id: string }> {
2525
return from(this.userModel.findOne({ email }).lean())
2626
}
2727

0 commit comments

Comments
 (0)