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
|
|
@ -20,7 +20,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to add lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Lists.insert({
|
||||
return Lists.insertAsync({
|
||||
listName: listName,
|
||||
listShared: isShared,
|
||||
listOwner: this.userId,
|
||||
|
|
@ -36,7 +36,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to edit lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Lists.update({ _id: listId }, {
|
||||
return Lists.updateAsync({ _id: listId }, {
|
||||
$set: {
|
||||
listName: listName,
|
||||
listShared: isShared,
|
||||
|
|
@ -50,7 +50,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to delete lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Lists.remove({ _id: listId });
|
||||
return Lists.removeAsync({ _id: listId });
|
||||
},
|
||||
'mark.complete' (listId) {
|
||||
check(listId, String);
|
||||
|
|
@ -59,7 +59,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to mark lists complete. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Lists.update({ _id: listId }, {
|
||||
return Lists.updateAsync({ _id: listId }, {
|
||||
$set: {
|
||||
listComplete: true,
|
||||
completedOn: new Date()
|
||||
|
|
@ -73,7 +73,7 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to restore completed lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Lists.update({ _id: listId }, {
|
||||
return Lists.updateAsync({ _id: listId }, {
|
||||
$set: {
|
||||
listComplete: false,
|
||||
completedOn: new Date()
|
||||
|
|
@ -85,6 +85,6 @@ Meteor.methods({
|
|||
throw new Meteor.Error('You are not allowed to clean up old lists. Make sure you are logged in with valid user credentials.');
|
||||
}
|
||||
|
||||
return Lists.remove({ listComplete: true });
|
||||
return Lists.removeAsync({ listComplete: true });
|
||||
},
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue