Merge pull request #2328 from overleaf/em-project-imports
Move ProjectEntityMongoUpdateHandler to async/await GitOrigin-RevId: e5c0d4a7ece34c3ded89b6eae3673135061f375a
This commit is contained in:
committed by
sharelatex
parent
e3c8de035a
commit
3bd15b1a47
@@ -4,6 +4,7 @@ const Errors = require('../Errors/Errors')
|
||||
const _ = require('underscore')
|
||||
const logger = require('logger-sharelatex')
|
||||
const async = require('async')
|
||||
const { promisifyAll } = require('../../util/promises')
|
||||
|
||||
const ProjectLocator = {
|
||||
findElement(options, _callback) {
|
||||
@@ -327,3 +328,9 @@ function getIndexOf(searchEntity, id) {
|
||||
}
|
||||
|
||||
module.exports = ProjectLocator
|
||||
module.exports.promises = promisifyAll(ProjectLocator, {
|
||||
multiResult: {
|
||||
findElement: ['element', 'path', 'folder'],
|
||||
findElementByPath: ['element', 'type']
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user