Add processing for upload dlock

This commit is contained in:
Senad Uka
2019-07-25 15:36:49 +02:00
parent 2db47e95e1
commit b0cadd14ea
13 changed files with 312 additions and 86 deletions

View File

@@ -5,6 +5,7 @@ const { getAllIncidents } = require('../services/integration/reports');
const { getMembersFeesForDateRange } = require('../services/integration/invoiceIntegration');
const { deleteFeesFromORD, addFeesToORD } = require('../services/officeRnD/fees');
const { checkBookingChanges } = require('../services/integration/checkBookingChange');
const { checkIfProcessing } = require('../services/integration/processingStatus');
const getKnownOfficeResourceMappings = (req, res) => {
const dataToFetch = [getMappingsFromDatabase(), fetchOffices(), fetchResources() ];
@@ -111,10 +112,25 @@ const addFees = (req, res) => {
}
};
const checkProcessingStatus = (req, res) => {
checkIfProcessing()
.then((processing) => {
res.send({
processing
})
})
.catch((error) => {
console.log('Error checking if processing ');
console.log(error);
res.status(500).send(error);
});
};
module.exports = {
getKnownOfficeResourceMappings,
addNewMapping,
getAllIncidentsController,
getMemberIncidents,
addFees,
checkProcessingStatus,
};