|
"use server";
|
|
|
|
import prisma from "@/lib/prisma";
|
|
import { Account } from "@prisma/client";
|
|
|
|
export async function getGithubAccount(userId: string): Promise<Account | null> {
|
|
return prisma.account.findFirst({
|
|
where: {
|
|
userId: userId,
|
|
provider: "github",
|
|
},
|
|
});
|
|
} |