Skip to content

Commit

Permalink
Merge pull request nestjs#2679 from HugoMichard/patch-1
Browse files Browse the repository at this point in the history
docs(database): fix TypeScript error for UsersService
  • Loading branch information
kamilmysliwiec authored Mar 27, 2023
2 parents e03f072 + e491450 commit 86b5608
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions content/techniques/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,11 @@ export class UsersService {
return this.usersRepository.find();
}

findOne(id: number): Promise<User> {
findOne(id: number): Promise<User | null> {
return this.usersRepository.findOneBy({ id });
}

async remove(id: string): Promise<void> {
async remove(id: number): Promise<void> {
await this.usersRepository.delete(id);
}
}
Expand Down

0 comments on commit 86b5608

Please sign in to comment.