diff --git a/server/controllers/assajos.controller.js b/server/controllers/assajos.controller.js index 5484908f..5fcd0d5a 100644 --- a/server/controllers/assajos.controller.js +++ b/server/controllers/assajos.controller.js @@ -100,7 +100,7 @@ exports.assajos_post = async (req, res, next) => { ) .then(() => { connection.commit(); - res.send(); + res.status(204).send(); }) .catch(transactionRollback); }) @@ -138,6 +138,6 @@ exports.assajos_delete = async (req, res, next) => { COMMIT;`, [id_assaig] ) - .then(() => res.send()) + .then(() => res.status(204).send()) .catch((e) => next(e)); }; diff --git a/server/controllers/esdeveniments.controller.js b/server/controllers/esdeveniments.controller.js index f555ce82..568080a6 100644 --- a/server/controllers/esdeveniments.controller.js +++ b/server/controllers/esdeveniments.controller.js @@ -50,7 +50,7 @@ exports.esdeveniments_post = (req, res, next) => { VALUES (?, ?, ?, ?, ?);`, [data_inici, data_final, estat_esdeveniment] ) - .then((result) => res.end(result)) + .then(() => res.status(204).send()) .catch((e) => next(e)); }; diff --git a/server/controllers/localitzacions.controller.js b/server/controllers/localitzacions.controller.js index 112e8547..ca03714c 100644 --- a/server/controllers/localitzacions.controller.js +++ b/server/controllers/localitzacions.controller.js @@ -16,7 +16,7 @@ exports.localitzacions_post = (req, res, next) => { VALUES (?, ?, ?, ?, ?, ?, ?)`, [tipus_via, carrer, numero, fins_numero, codi_postal, gmaps, ciutat] ) - .then((result) => res.send(result)) + .then(() => res.status(204).send()) .catch((e) => next(e)); }; diff --git a/server/controllers/socis.controller.js b/server/controllers/socis.controller.js index 7c1eb45d..96f2f867 100644 --- a/server/controllers/socis.controller.js +++ b/server/controllers/socis.controller.js @@ -230,7 +230,7 @@ exports.socis_post = async (req, res, next) => { ) .then(() => { connection.commit(); - res.send(); + res.status(204).send(); }) .catch(transactionRollback); }) @@ -273,7 +273,7 @@ exports.socis_delete = (req, res, next) => { COMMIT;`, [id_persona] ) - .then(() => res.send()) + .then(() => res.status(204).send()) .catch((e) => next(e)); }; @@ -410,7 +410,8 @@ exports.socis_detall_acceptadretsimatge_put = (req, res, next) => { exports.socis_detall_acceptacions_put = (req, res, next) => { const pool = req.app.get("pool"); const id_soci = req.params.id; - const acceptacions = req.body; // { form_name: true } + /** @type {Object} */ + const acceptacions = req.body; pool .query(