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
|
|
@ -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,
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue