mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Added a delete confirmation modal to all views.
This commit is contained in:
parent
4d9d2acff6
commit
29ddc544e5
27 changed files with 117 additions and 127 deletions
|
|
@ -45,13 +45,6 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to delete stores. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
let storeInfo = Stores.findOne({ _id: storeId });
|
||||
let myId = this.userId;
|
||||
if (myId == storeInfo.owner) {
|
||||
return Stores.remove({ _id: storeId });
|
||||
} else {
|
||||
console.log("User not allowed to delete this store. Not the owner!");
|
||||
return("Not Allowed!");
|
||||
}
|
||||
return Stores.remove({ _id: storeId });
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue