mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Updating framework to meteor 3 and later
This commit is contained in:
parent
717994508a
commit
cca29bc591
58 changed files with 2332 additions and 1611 deletions
|
|
@ -19,7 +19,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to add items. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return MenuItems.insert({
|
||||
return MenuItems.insertAsync({
|
||||
itemName: itemName,
|
||||
addedBy: this.userId,
|
||||
dateAddedtoMenu: new Date(),
|
||||
|
|
@ -34,7 +34,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to set this menu item as linked to products. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return MenuItems.update({ _id: itemId }, {
|
||||
return MenuItems.updateAsync({ _id: itemId }, {
|
||||
$set: {
|
||||
isLinked: isLinked,
|
||||
}
|
||||
|
|
@ -48,7 +48,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to edit menu items. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return MenuItems.update({ _id: itemId }, {
|
||||
return MenuItems.updateAsync({ _id: itemId }, {
|
||||
$set: {
|
||||
itemName: itemName,
|
||||
}
|
||||
|
|
@ -61,7 +61,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to delete menu items. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return MenuItems.remove({ _id: itemId });
|
||||
return MenuItems.removeAsync({ _id: itemId });
|
||||
},
|
||||
'shiftDate' (itemId, momentAddDay) {
|
||||
check(itemId, String);
|
||||
|
|
@ -71,7 +71,7 @@ Meteor.methods({
|
|||
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 }, {
|
||||
return MenuItems.updateAsync({ _id: itemId }, {
|
||||
$set: {
|
||||
serveDate: momentAddDay,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue