Skip to content

Commit 6dcea4c

Browse files
authored
Update sql.md
id converted to a number which is at findOne method because it shows error like `(property) id?: number | FindOperator<number> Type 'string' is not assignable to type 'number | FindOperator<number>'.ts(2322)` also, id is the number at the given example https://github.com/nestjs/nest/blob/master/sample/05-sql-typeorm/src/users/users.service.ts#L26
1 parent 818c543 commit 6dcea4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/techniques/sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ export class UsersService {
180180
return this.usersRepository.find();
181181
}
182182

183-
findOne(id: string): Promise<User> {
183+
findOne(id: number): Promise<User> {
184184
return this.usersRepository.findOneBy({ id });
185185
}
186186

0 commit comments

Comments
 (0)