import { eq } from "drizzle-orm"; import { database } from "~/database/context"; import * as schema from "~/database/schema"; export type LinkedAccount = { id: string; providerId: string; }; export async function findLinkedAccountsByUserId(userId: string): Promise { const db = database(); return db .select({ id: schema.accounts.id, providerId: schema.accounts.providerId }) .from(schema.accounts) .where(eq(schema.accounts.userId, userId)); }