From c5849f30724c88f32b826e83cd1dafa46080be8f Mon Sep 17 00:00:00 2001 From: Ignacio Tula Date: Wed, 20 Nov 2024 19:02:14 +0000 Subject: [PATCH] problema con redirecto. Mejor 200 y listo --- routes/vehiculos.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/routes/vehiculos.py b/routes/vehiculos.py index 993bb98..d68c997 100644 --- a/routes/vehiculos.py +++ b/routes/vehiculos.py @@ -112,7 +112,7 @@ def cambiar_estado(): flash('Estado cambiado con exito', 'success') - redirect(url_for('vehiculos.listar_vehiculos')) + return jsonify(vehiculo.serialize()), 200 @vehiculos.route('/vehiculos/estadoXid', methods=['PUT']) @@ -127,4 +127,4 @@ def cambiar_estadoXid(): Vehiculo.actualizar() - redirect(url_for('vehiculos.listar_vehiculos')) \ No newline at end of file + return jsonify(vehiculo.serialize()), 200 \ No newline at end of file