Finished adding the simplest form of Menus.

This commit is contained in:
Brian McGonagill 2022-08-27 16:59:01 -05:00
parent 3290b3086a
commit 075dd57996
9 changed files with 107 additions and 12 deletions

View file

@ -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,
}
});
}
});