mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
cleanup
This commit is contained in:
2
common/dist/sprites/habitrpg-shared.css
vendored
2
common/dist/sprites/habitrpg-shared.css
vendored
File diff suppressed because one or more lines are too long
@@ -196,8 +196,6 @@ api.scoreTask = {
|
||||
}).exec()
|
||||
.then((task) => {
|
||||
if (!task) throw new NotFound(res.t('taskNotFound'));
|
||||
|
||||
let delta = user.ops.score({params:{id:task.id, direction:direction}, language: req.language});
|
||||
})
|
||||
.then(() => res.respond(200, {})) // TODO what to return
|
||||
.catch(next);
|
||||
|
||||
@@ -509,11 +509,11 @@ function _populateDefaultTasks (user, taskTypes) {
|
||||
if (tagsI !== -1) {
|
||||
taskTypes = _.clone(taskTypes);
|
||||
taskTypes.splice(tagsI, 1);
|
||||
};
|
||||
}
|
||||
|
||||
_.each(taskTypes, (taskType) => {
|
||||
let tasksOfType = _.map(shared.content.userDefaults[`${taskType}s`], (taskDefaults) => {
|
||||
let newTask = new (Tasks[taskType])(taskDefaults);
|
||||
let newTask = new Tasks[taskType](taskDefaults);
|
||||
|
||||
newTask.userId = user._id;
|
||||
newTask.text = taskDefaults.text(user.preferences.language);
|
||||
|
||||
Reference in New Issue
Block a user