2021-07-12 12:47:20 -04:00
|
|
|
const settings = require('@overleaf/settings')
|
2020-07-23 14:42:49 -04:00
|
|
|
|
|
|
|
const persistorSettings = settings.docstore
|
2020-09-10 13:07:14 -04:00
|
|
|
persistorSettings.Metrics = require('@overleaf/metrics')
|
2020-07-23 14:42:49 -04:00
|
|
|
|
|
|
|
const ObjectPersistor = require('@overleaf/object-persistor')
|
2023-05-08 05:45:08 -04:00
|
|
|
const AbstractPersistor = require('@overleaf/object-persistor/src/AbstractPersistor')
|
|
|
|
const persistor = settings.docstore.backend
|
|
|
|
? ObjectPersistor(persistorSettings)
|
|
|
|
: new AbstractPersistor()
|
2020-07-23 14:42:49 -04:00
|
|
|
|
|
|
|
module.exports = persistor
|