mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
[#1741] remove _id from TaskSchema (we're too deep in our legacy task.id
requirement, we can revisit later)
This commit is contained in:
@@ -366,7 +366,7 @@ function unlink(user, cid, keep, tid) {
|
||||
user.tasks[tid].challenge = {};
|
||||
break;
|
||||
case 'remove':
|
||||
user[user.tasks[tid].type+'s'].id(tid).remove();
|
||||
user.deleteTask(tid);
|
||||
break;
|
||||
case 'keep-all':
|
||||
_.each(user.tasks, function(t){
|
||||
@@ -378,7 +378,7 @@ function unlink(user, cid, keep, tid) {
|
||||
case 'remove-all':
|
||||
_.each(user.tasks, function(t){
|
||||
if (t.challenge && t.challenge.id == cid) {
|
||||
user[t.type+'s'].id(t.id).remove();
|
||||
user.deleteTask(t.id);
|
||||
}
|
||||
})
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user