mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Many chcanges, but version 0.1.0 is ready to be cut.
This commit is contained in:
parent
42643a37f5
commit
6e37ae8c74
46 changed files with 1038 additions and 273 deletions
|
|
@ -41,7 +41,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to edit products. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Products.update({ _id: itemId }, {
|
||||
return Products.update({ _id: prodId }, {
|
||||
$set: {
|
||||
prodName: prodName,
|
||||
prodCategory: prodCategory,
|
||||
|
|
@ -59,7 +59,7 @@ Meteor.methods({
|
|||
|
||||
let prodInfo = Products.findOne({ _id: prodId });
|
||||
let myId = this.userId;
|
||||
if (myId == prodInfo.owner) {
|
||||
if (myId == prodInfo.prodOwner) {
|
||||
return Products.remove({ _id: prodId });
|
||||
} else {
|
||||
console.log("User not allowed to delete this product. Not the owner!");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue