first commit

This commit is contained in:
polaris
2024-06-29 01:22:22 -04:00
commit 8926934d2d
242 changed files with 494247 additions and 0 deletions

19
lib/GetUserAccessCode.ts Normal file
View File

@ -0,0 +1,19 @@
"use server";
import { getAuth } from "@/auth/queries/getauth";
import { daphnis } from "@/lib/prisma";
export async function getLachesisInUseCards() {
const { user } = await getAuth();
if (!user || !user.accessCode) {
throw new Error("User is not authenticated or accessCode is missing");
}
const aimeUser = await daphnis.user.findFirst({
where: {
accessCode: user.accessCode,
},
});
return aimeUser;
}