18 lines
533 B
JavaScript
18 lines
533 B
JavaScript
const express = require('express');
|
|
const app = express();
|
|
const { verificaToken } = require('../middleware/autentificacion');
|
|
const route = '/motivo';
|
|
const historialMotivosEquipo = require('../controller/Motivo/historialMotivosEquipo');
|
|
|
|
app.get(`${route}/historial_motivos_equipo`, verificaToken, (req, res) => {
|
|
return historialMotivosEquipo(req.query)
|
|
.then((data) => {
|
|
res.status(200).json(data);
|
|
})
|
|
.catch((err) => {
|
|
res.status(400).json({ message: err.message });
|
|
});
|
|
});
|
|
|
|
module.exports = app;
|