delete list
This commit is contained in:
@@ -77,6 +77,14 @@ class ShoppingListRepository {
|
||||
DELETE FROM shopping_list_items WHERE id = ? AND list_id = ?
|
||||
`).run(itemId, listId);
|
||||
}
|
||||
|
||||
deleteList(listId) {
|
||||
db.prepare(`
|
||||
DELETE FROM shopping_list_items WHERE list_id = ?
|
||||
`).run(listId);
|
||||
return db.prepare(`DELETE FROM shopping_lists WHERE id = ?
|
||||
`).run(listId);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = new ShoppingListRepository();
|
||||
|
||||
Reference in New Issue
Block a user