Added ability to restore a completed lilst from List Management. #27

This commit is contained in:
Brian McGonagill 2025-05-26 16:22:58 -05:00
parent dcd0074b28
commit c9c96d214d
5 changed files with 52 additions and 6 deletions

View file

@ -64,7 +64,21 @@ Meteor.methods({
listComplete: true,
completedOn: new Date()
}
});;
});
},
'mark.incomplete' (listId) {
check(listId, String);
if (!this.userId) {
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 }, {
$set: {
listComplete: false,
completedOn: new Date()
}
});
},
'clean.Lists' () {
if (!this.userId) {