fix fetching incidents for specific date in backend
This commit is contained in:
@@ -33,7 +33,12 @@ 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);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user