mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Updated login headers save. Added task service to user service. Sync user tasks
This commit is contained in:
@@ -5,6 +5,7 @@ import taskDefaults from '../libs/taskDefaults';
|
||||
module.exports = function addTask (user, req = {body: {}}) {
|
||||
let task = taskDefaults(req.body);
|
||||
user.tasksOrder[`${task.type}s`].unshift(task._id);
|
||||
user[`${task.type}s`].unshift(task);
|
||||
|
||||
if (user.preferences.newTaskEdit) {
|
||||
task._editing = true;
|
||||
|
||||
Reference in New Issue
Block a user