CHanged Event admin layout

This commit is contained in:
PxlLoewe
2025-03-10 18:11:28 -07:00
parent 77b266e0bf
commit c01e618a56
17 changed files with 918 additions and 170 deletions

View File

@@ -23,10 +23,11 @@ export const GET = async (req: NextRequest) => {
});
if (!user)
return NextResponse.json({ error: "User not found" }, { status: 404 });
setTimeout(async () => {
console.log("getting moodle ID");
const moodleUser = await getMoodleUserById(user.id);
prisma.user.update({
console.log("got moodle ID", moodleUser.id);
await prisma.user.update({
where: {
id: user.id,
},
@@ -35,8 +36,6 @@ export const GET = async (req: NextRequest) => {
},
});
if (user.moodleId) return;
const participatingEvents = await prisma.participant.findMany({
where: {
userId: user.id,