(req)
| 54 | } |
| 55 | // /me route handler |
| 56 | async getCurrentUser(req) { |
| 57 | if (!req.user) { |
| 58 | throw new UnauthorizedException( |
| 59 | 'You are not logged in or there may be an error. Please log in again.' |
| 60 | ); |
| 61 | } |
| 62 | const user = await this.prisma.users.findUnique({ |
| 63 | where: { |
| 64 | id: req.user.id, |
| 65 | }, |
| 66 | }); |
| 67 | return user; |
| 68 | } |
| 69 | |
| 70 | // /logout route handler |
| 71 | async logout(res) { |
nothing calls this directly
no outgoing calls
no test coverage detected