mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Finished adding the simplest form of Menus.
This commit is contained in:
parent
3290b3086a
commit
075dd57996
9 changed files with 107 additions and 12 deletions
|
|
@ -83,5 +83,19 @@ Meteor.methods({
|
|||
}
|
||||
|
||||
return MenuItems.remove({ _id: itemId });
|
||||
},
|
||||
'shiftDate' (itemId, momentAddDay) {
|
||||
check(itemId, String);
|
||||
check(momentAddDay, String);
|
||||
|
||||
if (!this.userId) {
|
||||
throw new Meteor.Error('You are not allowed to shift menu item dates. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return MenuItems.update({ _id: itemId }, {
|
||||
$set: {
|
||||
serveDate: momentAddDay,
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue