Many chcanges, but version 0.1.0 is ready to be cut.

This commit is contained in:
Brian McGonagill 2022-08-23 13:41:21 -05:00
parent 42643a37f5
commit 6e37ae8c74
46 changed files with 1038 additions and 273 deletions

View file

@ -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!");