Merge pull request #2328 from overleaf/em-project-imports

Move ProjectEntityMongoUpdateHandler to async/await

GitOrigin-RevId: e5c0d4a7ece34c3ded89b6eae3673135061f375a
This commit is contained in:
Timothée Alby
2019-11-12 09:15:18 +00:00
committed by sharelatex
parent e3c8de035a
commit 3bd15b1a47
8 changed files with 3444 additions and 4 deletions
@@ -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']
}
})