api history list alarm
This commit is contained in:
16
controllers/history_value.controller.js
Normal file
16
controllers/history_value.controller.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const HistoryValue = require('../services/history_value.service');
|
||||
const { setResponsePaging } = require('../helpers/utils');
|
||||
|
||||
class HistoryValueController {
|
||||
// Get all units
|
||||
static async getAllHistoryAlarm(req, res) {
|
||||
const queryParams = req.query;
|
||||
|
||||
const results = await HistoryValue.getAllHistoryAlarm(queryParams);
|
||||
const response = await setResponsePaging(queryParams, results, 'Unit found');
|
||||
|
||||
res.status(response.statusCode).json(response);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = HistoryValueController;
|
||||
Reference in New Issue
Block a user