🐛 Update initialization checks (#3147)

This commit is contained in:
Iván Ovejero
2022-04-19 12:22:05 +02:00
committed by GitHub
parent 0081d02b97
commit f4e9562451
3 changed files with 3 additions and 3 deletions

View File

@@ -300,7 +300,7 @@ class App {
}
this.app.use((req: express.Request, res: express.Response, next: express.NextFunction) => {
if (Db.collections.Workflow === null) {
if (!Db.isInitialized) {
const error = new ResponseHelper.ResponseError('Database is not ready!', undefined, 503);
return ResponseHelper.sendErrorResponse(res, error);
}