Fixed docker deploments, moved files to _folders in dispatch app
This commit is contained in:
@@ -11,7 +11,7 @@ export const GET = async (req: NextRequest) => {
|
||||
if (!authHeader || !token) {
|
||||
return NextResponse.json({ error: "Not logged in" }, { status: 401 });
|
||||
}
|
||||
const decoded = await verify(token, process.env.NEXTAUTH_SECRET as string);
|
||||
const decoded = await verify(token, process.env.AUTH_HUB_SECRET as string);
|
||||
|
||||
if (typeof decoded === "string")
|
||||
return NextResponse.json({ error: "Invalid token" }, { status: 401 });
|
||||
@@ -22,8 +22,7 @@ export const GET = async (req: NextRequest) => {
|
||||
},
|
||||
});
|
||||
|
||||
if (!user)
|
||||
return NextResponse.json({ error: "User not found" }, { status: 404 });
|
||||
if (!user) return NextResponse.json({ error: "User not found" }, { status: 404 });
|
||||
setTimeout(async () => {
|
||||
const moodleUser = await getMoodleUserById(user.id);
|
||||
await prisma.user.update({
|
||||
@@ -49,10 +48,7 @@ export const GET = async (req: NextRequest) => {
|
||||
},
|
||||
});
|
||||
participatingEvents.forEach(async (p) => {
|
||||
await inscribeToMoodleCourse(
|
||||
p.Event.finisherMoodleCourseId!,
|
||||
moodleUser?.id,
|
||||
);
|
||||
await inscribeToMoodleCourse(p.Event.finisherMoodleCourseId!, moodleUser?.id);
|
||||
});
|
||||
}, 1000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user