mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-12-24 12:22:27 +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