fixed moodle logic
This commit is contained in:
@@ -5,6 +5,7 @@ import { DiscordAccount, prisma, User } from "@repo/db";
|
||||
import bcrypt from "bcryptjs";
|
||||
import oldUser from "./var.User.json";
|
||||
import { OldUser } from "../../../../types/oldUser";
|
||||
import { sendVerificationLink } from "(app)/admin/user/action";
|
||||
|
||||
export const options: AuthOptions = {
|
||||
providers: [
|
||||
@@ -69,6 +70,7 @@ export const options: AuthOptions = {
|
||||
},
|
||||
});
|
||||
}
|
||||
await sendVerificationLink(newUser.id);
|
||||
return newUser;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@ export const GET = async (req: NextRequest) => {
|
||||
if (!user) return NextResponse.json({ error: "User not found" }, { status: 404 });
|
||||
setTimeout(async () => {
|
||||
const moodleUser = await getMoodleUserById(user.id);
|
||||
|
||||
await prisma.user.update({
|
||||
where: {
|
||||
id: user.id,
|
||||
|
||||
Reference in New Issue
Block a user