mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
fix exports
This commit is contained in:
@@ -3,7 +3,7 @@ import clone from 'lodash/clone';
|
||||
|
||||
// TODO move to client since it's only used there?
|
||||
|
||||
module.exports = function addTask (user, req = {body: {}}) {
|
||||
export default function addTask (user, req = {body: {}}) {
|
||||
let task = taskDefaults(req.body, user);
|
||||
user.tasksOrder[`${task.type}s`].unshift(task._id);
|
||||
user[`${task.type}s`].unshift(task);
|
||||
@@ -15,4 +15,4 @@ module.exports = function addTask (user, req = {body: {}}) {
|
||||
task._advanced = !user.preferences.advancedCollapsed;
|
||||
|
||||
return task;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user