mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Updates for async and await - still
This commit is contained in:
parent
febb36d75f
commit
706c5dc3ef
18 changed files with 220 additions and 233 deletions
|
|
@ -13,7 +13,7 @@ MenuProdLinks.allow({
|
|||
});
|
||||
|
||||
Meteor.methods({
|
||||
'add.menuProdLinks' (menuItemId, menuItemName, prodNameArray) {
|
||||
async 'add.menuProdLinks' (menuItemId, menuItemName, prodNameArray) {
|
||||
check(menuItemId, String);
|
||||
check(menuItemName, String);
|
||||
check(prodNameArray, [Object]);
|
||||
|
|
@ -34,7 +34,7 @@ Meteor.methods({
|
|||
}
|
||||
});
|
||||
} else {
|
||||
return MenuProdLinks.insertAsync({
|
||||
return await MenuProdLinks.insertAsync({
|
||||
menuItemId: menuItemId,
|
||||
menuItemName: menuItemName,
|
||||
products: prodNameArray,
|
||||
|
|
@ -43,7 +43,7 @@ Meteor.methods({
|
|||
});
|
||||
}
|
||||
},
|
||||
'update.menuPordLInks' (menuItemId, menuItemName, prodNameArray) {
|
||||
async 'update.menuPordLInks' (menuItemId, menuItemName, prodNameArray) {
|
||||
check(menuItemId, String);
|
||||
check(menuItemName, String);
|
||||
check(prodNameArray, [Object]);
|
||||
|
|
@ -52,7 +52,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to add menu and product links. Make sure you are logged in with valid user credentials.');
|
||||
};
|
||||
|
||||
return MenuProdLinks.updateAsync({ menuItemId: menuItemId }, {
|
||||
return await MenuProdLinks.updateAsync({ menuItemId: menuItemId }, {
|
||||
$set: {
|
||||
products: prodNameArray,
|
||||
dateUpdated: Date(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue