feat: implement authentication system with email verification, user management dashboard, and administrative business controls
Some checks failed
Build and Push App / build (push) Failing after 1m9s
Some checks failed
Build and Push App / build (push) Failing after 1m9s
This commit is contained in:
@@ -25,3 +25,19 @@ export async function getClients() {
|
||||
return { success: false, error: "Erreur lors de la récupération des clients" };
|
||||
}
|
||||
}
|
||||
|
||||
export async function verifyUserEmail(userId: string) {
|
||||
try {
|
||||
await prisma.user.update({
|
||||
where: { id: userId },
|
||||
data: {
|
||||
emailVerified: true,
|
||||
verificationToken: null
|
||||
}
|
||||
});
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
console.error("Failed to verify user email:", error);
|
||||
return { success: false, error: "Erreur lors de la vérification de l'email" };
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user