Ajout d'un fichier action.ts

This commit is contained in:
Rampeur
2025-08-11 22:37:30 +02:00
parent 879c7c68d6
commit e1969a2f83
@@ -0,0 +1,9 @@
"use server";
import { deleteSession } from "@/utils/auth/session";
import { redirect } from "next/navigation";
export const logoutAction = async () => {
await deleteSession();
redirect("/login");
};