Updates to make Menu and lists work together again.

This commit is contained in:
Brian McGonagill 2025-07-30 07:11:50 -05:00
parent b5d490c052
commit 9223f21e06
7 changed files with 32 additions and 27 deletions

View file

@ -22,11 +22,11 @@ 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.');
};
let linkExists = MenuProdLinks.findOne({ menuItemId: menuItemId });
let linkExists = await MenuProdLinks.findOneAsync({ menuItemId: menuItemId });
if (linkExists) {
// console.log("sending to update method instead.");
Meteor.call('update.menuPordLInks', menuItemId, menuItemName, prodNameArray, function(err, result) {
await Meteor.callAsync('update.menuPordLInks', menuItemId, menuItemName, prodNameArray, function(err, result) {
if (err) {
// console.log(" ERROR moving to the update method: " + err);
} else {