mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
if retore url is not in mongo don't blow up
This commit is contained in:
parent
4b11790a54
commit
8795a8a921
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,12 @@
|
|||
Settings = require "settings-sharelatex"
|
||||
mongojs = require "mongojs"
|
||||
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"
|
||||
|
||||
|
|
Loading…
Reference in a new issue