(id: string)
| 38 | } |
| 39 | |
| 40 | async findOne(id: string): Promise<User> { |
| 41 | const user = await this.usersRepository.findOne({ |
| 42 | where: { id }, |
| 43 | relations: ['subscription'], |
| 44 | }); |
| 45 | |
| 46 | if (!user) { |
| 47 | throw new NotFoundException('User not found'); |
| 48 | } |
| 49 | |
| 50 | return user; |
| 51 | } |
| 52 | |
| 53 | async findByEmail(email: string): Promise<User | null> { |
| 54 | return this.usersRepository.findOne({ |
no outgoing calls
no test coverage detected