diff --git a/server/controller/Prestamo/recoger.js b/server/controller/Prestamo/entregar.js similarity index 97% rename from server/controller/Prestamo/recoger.js rename to server/controller/Prestamo/entregar.js index e64ed66..02f8efc 100644 --- a/server/controller/Prestamo/recoger.js +++ b/server/controller/Prestamo/entregar.js @@ -8,7 +8,7 @@ const Operador = require(`${dbPath}/Operador`); const Prestamo = require(`${dbPath}/Prestamo`); const TipoCarrito = require(`${dbPath}/TipoCarrito`); -const recoger = async (body) => { +const entregar = async (body) => { const ahora = moment(); const idPrestamo = validarId(body.idPrestamo); const idOperadorEntrega = validarId(body.idOperadorEntrega); @@ -61,4 +61,4 @@ const recoger = async (body) => { }); }; -module.exports = recoger; +module.exports = entregar; diff --git a/server/routes/Prestamo.js b/server/routes/Prestamo.js index c3d42ad..6ad7da7 100644 --- a/server/routes/Prestamo.js +++ b/server/routes/Prestamo.js @@ -8,7 +8,7 @@ const historial = require(`${controllerPath}/historial`); const historialEquipo = require(`${controllerPath}/historialEquipo`); const historialUsuario = require(`${controllerPath}/historialUsuario`); const pedir = require(`${controllerPath}/pedir`); -const recoger = require(`${controllerPath}/recoger`); +const entregar = require(`${controllerPath}/entregar`); const regresar = require(`${controllerPath}/regresar`); const regresarNumeroInventario = require(`${controllerPath}/regresarNumeroInventario`); const prestamo = require(`${controllerPath}/prestamo`); @@ -31,10 +31,10 @@ app.post( ); app.put( - `${route}/recoger`, + `${route}/entregar`, // verificaToken, (req, res) => { - return recoger(req.body) + return entregar(req.body) .then((data) => { res.status(200).json(data); })