diff --git a/services/web/app/coffee/Features/Restore/RestoreController.coffee b/services/web/app/coffee/Features/Restore/RestoreController.coffee index 9ff9f3ee4b..8a8f2cdb41 100644 --- a/services/web/app/coffee/Features/Restore/RestoreController.coffee +++ b/services/web/app/coffee/Features/Restore/RestoreController.coffee @@ -1,6 +1,12 @@ Settings = require "settings-sharelatex" mongojs = require "mongojs" -db = mongojs.connect(Settings.mongo.restoreUrl, ["projects", "users"]) +logger = require("logger-sharelatex") +if Settings.mongo.restoreUrl? + logger.log "restore url defined, talking to old db" + db = mongojs.connect(Settings.mongo.restoreUrl, ["projects", "users"]) +else + logger.log "restore not not defined, continuing as normal" + db = {} ObjectId = mongojs.ObjectId VersioningApiHandler = require "../Versioning/VersioningApiHandler"