( externalUserId: string, internalAccountId: string )
| 28 | } |
| 29 | |
| 30 | export const findUser = async ( |
| 31 | externalUserId: string, |
| 32 | internalAccountId: string |
| 33 | ) => { |
| 34 | return await prisma.users.findUnique({ |
| 35 | where: { |
| 36 | externalUserId_accountsId: { |
| 37 | accountsId: internalAccountId, |
| 38 | externalUserId, |
| 39 | }, |
| 40 | }, |
| 41 | }); |
| 42 | }; |
| 43 | |
| 44 | export const createUser = async (user: Prisma.usersUncheckedCreateInput) => { |
| 45 | if (user.accountsId && user.externalUserId) { |
no outgoing calls
no test coverage detected