mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 14:17:22 +01:00
Node 8 (WIP) (#9946)
* start upgrade to node 8 * upgrade travis * improve travis * Remove bluebird, babel (except for modules) from server (WIP) (#9947) * remove bluebird, babel from server (except for modules) * fixes * fix path * fix path * fix export * fix export * fix test * fix tests * remove plugin for transform-object-rest-spread since it is supported in node8 * babel: correct syntax rest spread * remove bluebird * update migrations archive readme * fix package-lock.json * fix typo * add package-loc
This commit is contained in:
@@ -3,7 +3,6 @@ import * as Tasks from '../models/task';
|
||||
import {
|
||||
BadRequest,
|
||||
} from './errors';
|
||||
import Bluebird from 'bluebird';
|
||||
import _ from 'lodash';
|
||||
import shared from '../../common';
|
||||
|
||||
@@ -18,9 +17,9 @@ async function _validateTaskAlias (tasks, res) {
|
||||
throw new BadRequest(res.t('taskAliasAlreadyUsed'));
|
||||
}
|
||||
|
||||
await Bluebird.map(tasksWithAliases, (task) => {
|
||||
await Promise.all(tasksWithAliases.map((task) => {
|
||||
return task.validate();
|
||||
});
|
||||
}));
|
||||
}
|
||||
|
||||
export function setNextDue (task, user, dueDateOption) {
|
||||
@@ -137,7 +136,7 @@ export async function createTasks (req, res, options = {}) {
|
||||
|
||||
toSave.unshift(owner.save());
|
||||
|
||||
let tasks = await Bluebird.all(toSave);
|
||||
let tasks = await Promise.all(toSave);
|
||||
tasks.splice(0, 1); // Remove user, challenge, or group promise
|
||||
return tasks;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user