mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-25 04:43:03 +03:00
Add missing sessionId check.
This commit is contained in:
parent
a69c286011
commit
78272efaae
@ -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),
|
||||
},
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user