mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Added ability to restore a completed lilst from List Management. #27
This commit is contained in:
parent
dcd0074b28
commit
c9c96d214d
5 changed files with 52 additions and 6 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue