Update Mongodb client to 2.2.4 (#2329)
* chore(package): update mongodb to version 2.2.4 https://greenkeeper.io/ * fix for mongo 2.2.4 * Delete schema promise on error... - Just because this way we can let the adapter an opportunity to yield a new error.... OR A SUCCESS * Fixes test * Restore fix
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
"lru-cache": "4.0.1",
|
"lru-cache": "4.0.1",
|
||||||
"mailgun-js": "0.7.10",
|
"mailgun-js": "0.7.10",
|
||||||
"mime": "1.3.4",
|
"mime": "1.3.4",
|
||||||
"mongodb": "2.1.18",
|
"mongodb": "2.2.4",
|
||||||
"multer": "1.1.0",
|
"multer": "1.1.0",
|
||||||
"parse": "1.9.0",
|
"parse": "1.9.0",
|
||||||
"parse-server-fs-adapter": "1.0.0",
|
"parse-server-fs-adapter": "1.0.0",
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ describe('server', () => {
|
|||||||
expect(response.statusCode).toEqual(500);
|
expect(response.statusCode).toEqual(500);
|
||||||
expect(body.code).toEqual(1);
|
expect(body.code).toEqual(1);
|
||||||
expect(body.message).toEqual('Internal server error.');
|
expect(body.message).toEqual('Internal server error.');
|
||||||
done();
|
reconfigureServer().then(done, done);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -110,7 +110,8 @@ DatabaseController.prototype.validateClassName = function(className) {
|
|||||||
DatabaseController.prototype.loadSchema = function() {
|
DatabaseController.prototype.loadSchema = function() {
|
||||||
if (!this.schemaPromise) {
|
if (!this.schemaPromise) {
|
||||||
this.schemaPromise = SchemaController.load(this.adapter);
|
this.schemaPromise = SchemaController.load(this.adapter);
|
||||||
this.schemaPromise.then(() => delete this.schemaPromise);
|
this.schemaPromise.then(() => delete this.schemaPromise,
|
||||||
|
() => delete this.schemaPromise);
|
||||||
}
|
}
|
||||||
return this.schemaPromise;
|
return this.schemaPromise;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user