return doclines as array from getProjectDocs

for compatibility with getDoc
This commit is contained in:
Brian Gough 2017-08-11 16:56:30 +01:00
parent 5971a19084
commit 8372911a1b

View file

@ -88,7 +88,10 @@ module.exports = ProjectManager =
if error?
logger.error err: error, project_id: project_id, doc_id: doc_id, "error getting project doc lines"
return cb(error)
docs.push {_id: doc_id, lines: lines, v: version}
try
docs.push {_id: doc_id, lines: JSON.parse(lines), v: version}
catch e
return cb(e)
cb()
async.series jobs, (error) ->
return callback(error) if error?