Skip to content
Snippets Groups Projects
Commit 0931b51a authored by Yogmatee Roochun's avatar Yogmatee Roochun
Browse files

xml triggers

parent 03e660b0
No related branches found
No related tags found
2 merge requests!60Dev,!58Shared data model
......@@ -126,7 +126,7 @@ async function pushXML(url, manuscriptId) {
)
await db.createFiles([fileInfo])
await Manuscript.updatePdfDepositState(manuscriptId)
logger.info('Uploading to Minio and the database has been completed.')
} else {
let styleErrString = `Style Errors: <br/><br/>`
......
......@@ -469,6 +469,13 @@ class Manuscript extends EpmcBaseModel {
.where('id', id)
return manuscriptUpdated
}
static async updatePdfDepositState(id) {
const manuscriptUpdated = await Manuscript.query()
.patch({ pdfDepositState: 'WAITING_FOR_PDF_CONVERSION' })
.where('id', id)
return manuscriptUpdated
}
}
module.exports = Manuscript
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment