(input: {
provider: string;
providerAccountId: string;
})
| 124 | export type Session = Awaited<ReturnType<typeof getServerSession>>; |
| 125 | |
| 126 | export async function findAccountByProviderAccountId(input: { |
| 127 | provider: string; |
| 128 | providerAccountId: string; |
| 129 | }) { |
| 130 | return db |
| 131 | .select() |
| 132 | .from(dbAccounts) |
| 133 | .where( |
| 134 | and( |
| 135 | eq(dbAccounts.provider, input.provider), |
| 136 | eq(dbAccounts.providerAccountId, input.providerAccountId), |
| 137 | ), |
| 138 | ) |
| 139 | .then((x) => x.at(0)); |
| 140 | } |
| 141 | |
| 142 | export function findTenantSessionByToken(token: string) { |
| 143 | return db |
no outgoing calls
no test coverage detected