(userId: string)
| 11 | import { getWebServerSettings } from "./web-server-settings"; |
| 12 | |
| 13 | export const findUserById = async (userId: string) => { |
| 14 | const userResult = await db.query.user.findFirst({ |
| 15 | where: eq(user.id, userId), |
| 16 | // with: { |
| 17 | // account: true, |
| 18 | // }, |
| 19 | }); |
| 20 | if (!userResult) { |
| 21 | throw new TRPCError({ |
| 22 | code: "NOT_FOUND", |
| 23 | message: "User not found", |
| 24 | }); |
| 25 | } |
| 26 | return userResult; |
| 27 | }; |
| 28 | |
| 29 | export const findOrganizationById = async (organizationId: string) => { |
| 30 | const organizationResult = await db.query.organization.findFirst({ |
no outgoing calls
no test coverage detected