calendar 32

This commit is contained in:
Alma 2025-04-13 16:56:31 +02:00
parent 75e6385ace
commit fefff8a8ee

View File

@ -144,7 +144,7 @@ export async function DELETE(
) {
const session = await getServerSession(authOptions);
if (!session?.user?.username) {
if (!session?.user?.id) {
return NextResponse.json({ error: "Non authentifié" }, { status: 401 });
}
@ -153,7 +153,7 @@ export async function DELETE(
const calendar = await prisma.calendar.findFirst({
where: {
id: params.id,
userId: session.user.username,
userId: session.user.id,
},
});