Make Practice Summary Report stub
This commit is contained in:
@@ -33,7 +33,29 @@ const addNewMapping = (req, res) => {
|
||||
};
|
||||
|
||||
const getAllIncidents = (req, res) => {
|
||||
getAllDoorLockIncidents()
|
||||
const dateRange = {
|
||||
startDate: req.params.startDate,
|
||||
endDate: req.params.endDate,
|
||||
};
|
||||
|
||||
getAllDoorLockIncidents(dateRange)
|
||||
.then((incidents) => {
|
||||
res.send(incidents);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log(error);
|
||||
res.send([]);
|
||||
});
|
||||
};
|
||||
|
||||
const getMemberIncidents = (req, res) => {
|
||||
const memberId = req.params.memberId;
|
||||
const dateRange = {
|
||||
startDate: req.params.startDate,
|
||||
endDate: req.params.endDate,
|
||||
};
|
||||
|
||||
getAllDoorLockIncidents(dateRange, memberId)
|
||||
.then((incidents) => {
|
||||
res.send(incidents);
|
||||
})
|
||||
@@ -57,4 +79,5 @@ module.exports = {
|
||||
getAllIncidents,
|
||||
getUnscheduledIncidents,
|
||||
getUnlockedIncidents,
|
||||
getMemberIncidents,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user