manal invite & remove member from shoppinglist
This commit is contained in:
@ -382,6 +382,7 @@ async function createInvite(sl_id) {
|
||||
}
|
||||
}
|
||||
|
||||
//User manuell einladen
|
||||
async function manInvite(sl_id, uid) {
|
||||
try {
|
||||
await nonQuery('INSERT INTO "Shoppinglist_member" (username, sl_id) VALUES ($1, $2);', [uid, sl_id]);
|
||||
@ -392,7 +393,17 @@ async function manInvite(sl_id, uid) {
|
||||
}
|
||||
}
|
||||
|
||||
//member von shoppinglist entfernen
|
||||
|
||||
async function removeMember(uid, sl_id) {
|
||||
try {
|
||||
await nonQuery('DELETE FROM "Shoppinglist_member" WHERE username = $1 AND sl_id = $2', [uid, sl_id]);
|
||||
}
|
||||
|
||||
catch(error) {
|
||||
console.error(error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -550,5 +561,5 @@ function probability(cur_item, data) {
|
||||
module.exports = {
|
||||
getShoppinglistsAdmin, getShoppinglistsShared, newShoppinglist, displayShoppinglist, deleteShoppinglist, addGroup,
|
||||
addItem, verifyInvite, createInvite, editShoppinglist, editGroup, editItem, deleteGroup, deleteItem, manInvite, updateUser,
|
||||
moveDoneItems, getDonePurchases, getShoppinglistsByLink, searchUsers
|
||||
moveDoneItems, getDonePurchases, getShoppinglistsByLink, searchUsers, removeMember
|
||||
}
|
||||
|
Reference in New Issue
Block a user