Skip to content

Commit 0a67328

Browse files
committed
Fix example
1 parent 8ecb6c0 commit 0a67328

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ Example using constructor injection:
169169
```typescript
170170
import { Service } from "typedi";
171171
import { Repository, EntityRepository } from "typeorm";
172-
import { OrmCustomRepository } from "typeorm-typedi-extensions";
172+
import { OrmRepository } from "typeorm-typedi-extensions";
173173
import "../entity/user";
174174

175175
// create custom Repository class
@@ -192,8 +192,8 @@ export class PostService {
192192
private readonly userRepository: UserRepository,
193193
) {}
194194

195-
public userExist(user: User): boolean {
196-
return this.userRepository.findByEmail(user.email) ? true : false;
195+
public async userExist(user: User): boolean {
196+
return await this.userRepository.findByEmail(user.email) ? true : false;
197197
}
198198

199199
}

0 commit comments

Comments
 (0)