Initial commit

This commit is contained in:
Luka Romih
2022-12-07 04:43:36 +01:00
commit 257f3c354f
496 changed files with 55373 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
const Extraction = require('../../models/extraction')
// Check if extraction process can be started.
exports.checkIfcanBegin = async extraction => {
if (extraction.status !== 'new') return false
if (extraction.ossParams) return extraction.ossParams.status === 'confirmed'
const documentsNames = await Extraction.fetchAllDocumentsNames(extraction.id)
return !!documentsNames.length
}