Updating framework to meteor 3 and later

This commit is contained in:
Brian McGonagill 2025-06-21 07:28:59 -05:00
parent 717994508a
commit cca29bc591
58 changed files with 2332 additions and 1611 deletions

View file

@ -19,7 +19,7 @@ Meteor.methods({
throw new Meteor.Error('You are not allowed to add recipes. Make sure you are logged in with valid user credentials.');
}
return Recipes.insert({
return Recipes.insertAsync({
recipeName: recipeName,
addedBy: this.userId,
addedOn: new Date(),
@ -33,7 +33,7 @@ Meteor.methods({
throw new Meteor.Error('You are not allowed to add recipes. Make sure you are logged in with valid user credentials.');
}
return Recipes.update({ _id: recipeId }, {
return Recipes.updateAsync({ _id: recipeId }, {
$set: {
recipeName: recipeName,
updatedOn: new Date(),
@ -48,6 +48,6 @@ Meteor.methods({
throw new Meteor.Error('You are not allowed to delete recipes. Make sure you are logged in with valid user credentials.');
}
return Recipes.remove({ _id: recipeId });
return Recipes.removeAsync({ _id: recipeId });
}
});