(userId: string, options: GetUserOptions = {})
| 35 | } |
| 36 | |
| 37 | export async function getUser(userId: string, options: GetUserOptions = {}) { |
| 38 | return findUser( |
| 39 | { |
| 40 | where: { |
| 41 | id: userId, |
| 42 | }, |
| 43 | }, |
| 44 | options, |
| 45 | ); |
| 46 | } |
| 47 | |
| 48 | export async function getUserByUsername(username: string, options: GetUserOptions = {}) { |
| 49 | return findUser({ where: { username: username.toLowerCase() } }, options); |