Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Merge ac7d706 into 598c8e5
Browse files Browse the repository at this point in the history
  • Loading branch information
grosspersky committed Oct 26, 2017
2 parents 598c8e5 + ac7d706 commit b8d203c
Show file tree
Hide file tree
Showing 97 changed files with 15,937 additions and 10,826 deletions.
2 changes: 1 addition & 1 deletion .docker/api/Dockerfile
@@ -1,4 +1,4 @@
FROM node:7.9.0
FROM node:8.8.1

WORKDIR /usr/src/app

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -6,7 +6,7 @@ dist: trusty
sudo: required
language: node_js
node_js:
- "7.9.0"
- "8.8.1"

addons:
apt:
Expand Down
8 changes: 4 additions & 4 deletions api/fixtures/FixtureLoader.ts
Expand Up @@ -89,7 +89,7 @@ export class FixtureLoader {
(<any>mongoose).Promise = global.Promise;

if (!mongoose.connection.readyState) {
mongoose.connect(config.database);
mongoose.connect(config.database, {useMongoClient: true});
}
}

Expand All @@ -109,9 +109,9 @@ export class FixtureLoader {
.then(() =>
// Load courses
Promise.all(
this.courses.map((courseFixtures) =>
this.courses.map((courseFixturesVar) =>
Promise.all(
courseFixtures.data.map((course) => {
courseFixturesVar.data.map((course) => {
// add random teacher as course admin
// add 2-10 random students
const tmp = <ICourseModel>course;
Expand All @@ -123,7 +123,7 @@ export class FixtureLoader {
tmp.students = tmp.students.concat(results[1]);
return tmp;
})
.then(() => new courseFixtures.Model(tmp).save());
.then(() => new courseFixturesVar.Model(tmp).save());
})
)
)
Expand Down

0 comments on commit b8d203c

Please sign in to comment.