delete /item
This commit is contained in:
@ -219,6 +219,18 @@ async function deleteGroup(group_id, sl_id) {
|
||||
}
|
||||
}
|
||||
|
||||
//Delete Item
|
||||
|
||||
async function deleteItem(item_id, group_id, sl_id) {
|
||||
try {
|
||||
nonQuery('DELETE FROM "Item" WHERE item_id = $1 AND group_id = $2 AND sl_id = $3;', [item_id, group_id, sl_id]);
|
||||
}
|
||||
|
||||
catch(error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@ -327,5 +339,5 @@ function generateInviteLink() {
|
||||
|
||||
module.exports = {
|
||||
getShoppinglistsAdmin, getShoppinglistsShared, newShoppinglist, displayShoppinglist, deleteShoppinglist, addGroup,
|
||||
addItem, verifyInvite, createInvite, editShoppinglist, editGroup, editItem, deleteGroup
|
||||
addItem, verifyInvite, createInvite, editShoppinglist, editGroup, editItem, deleteGroup, deleteItem
|
||||
}
|
||||
|
Reference in New Issue
Block a user