mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Removed Categories and Locations
This commit is contained in:
parent
c916c278a2
commit
2b1022f513
23 changed files with 4 additions and 637 deletions
|
|
@ -12,11 +12,9 @@ Products.allow({
|
|||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.product' (prodName, prodCategory, prodStore, prodLocation) {
|
||||
'add.product' (prodName, prodStore) {
|
||||
check(prodName, String);
|
||||
check(prodCategory, String);
|
||||
check(prodStore, String);
|
||||
check(prodLocation, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to add products. Make sure you are logged in with valid user credentials.');
|
||||
|
|
@ -25,17 +23,13 @@ Meteor.methods({
|
|||
return Products.insert({
|
||||
prodName: prodName,
|
||||
prodOwner: this.userId,
|
||||
prodCategory: prodCategory,
|
||||
prodStore: prodStore,
|
||||
prodLocation: prodLocation,
|
||||
});
|
||||
},
|
||||
'edit.product' (prodId, prodName, prodCategory, prodStore, prodLocation) {
|
||||
'edit.product' (prodId, prodName, prodStore) {
|
||||
check(prodId, String);
|
||||
check(prodName, String);
|
||||
check(prodCategory, String);
|
||||
check(prodStore, String);
|
||||
check(prodLocation, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to edit products. Make sure you are logged in with valid user credentials.');
|
||||
|
|
@ -44,9 +38,7 @@ Meteor.methods({
|
|||
return Products.update({ _id: prodId }, {
|
||||
$set: {
|
||||
prodName: prodName,
|
||||
prodCategory: prodCategory,
|
||||
prodStore: prodStore,
|
||||
prodLocation: prodLocation,
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue