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

@ -12,26 +12,21 @@ Stores.allow({
});
Meteor.methods({
'add.store' (storeName, storeType) {
'add.store' (storeName) {
check(storeName, String);
check(storeType, String);
if (!this.userId) {
throw new Meteor.Error('You are not allowed to add stores. Make sure you are logged in with valid user credentials.');
}
console.log(" ---- userid: " + Meteor.user()._id);
return Stores.insert({
storeName: storeName,
storeType: storeType,
owner: Meteor.user()._id,
owner: this.userId,
});
},
'edit.store' (storeId, storeName, storeType) {
'edit.store' (storeId, storeName) {
check(storeId, String);
check(storeName, String);
check(storeType, String);
if (!this.userId) {
throw new Meteor.Error('You are not allowed to edit stores. Make sure you are logged in with valid user credentials.');
@ -40,7 +35,6 @@ Meteor.methods({
return Stores.update({ _id: storeId }, {
$set: {
storeName: storeName,
storeType: storeType,
}
});
},