Add missing sessionId check.

This commit is contained in:
Dillon Kearns 2023-01-30 20:46:43 -08:00
parent a69c286011
commit 78272efaae

View File

@ -63,9 +63,10 @@ export async function updateTodo({ sessionId, todoId, description }) {
}
export async function deleteTodo({ sessionId, todoId }) {
await prisma.todo.delete({
await prisma.todo.deleteMany({
where: {
id: todoId,
user: whereSession(sessionId),
},
});
}