mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +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:
@@ -1,7 +1,6 @@
|
||||
// Currently this holds helpers for challenge api, but we should break this up into submodules as it expands
|
||||
import omit from 'lodash/omit';
|
||||
import uuid from 'uuid';
|
||||
import Bluebird from 'bluebird';
|
||||
import { model as Challenge } from '../../models/challenge';
|
||||
import {
|
||||
model as Group,
|
||||
@@ -82,7 +81,7 @@ export async function createChallenge (user, req, res) {
|
||||
|
||||
addUserJoinChallengeNotification(user);
|
||||
|
||||
let results = await Bluebird.all([challenge.save({
|
||||
let results = await Promise.all([challenge.save({
|
||||
validateBeforeSave: false, // already validate
|
||||
}), group.save()]);
|
||||
let savedChal = results[0];
|
||||
|
||||
Reference in New Issue
Block a user