feat: implementado todo lo de auditoria tocaria testearlo nomás
This commit is contained in:
@@ -117,8 +117,11 @@ public class AdminController: ControllerBase
|
||||
if (validacion1 == false) return Unauthorized();
|
||||
|
||||
if (id <= 0) return BadRequest(new { message = "Falto indicar id Propiedad"});
|
||||
|
||||
Cliente? cli = RepositorioUsuarios.Singleton.ObtenerClientePorToken(Auth);
|
||||
if (cli == null) return Unauthorized();
|
||||
|
||||
var ret = RepositorioPropiedades.Singleton.BajaPropiedad(id);
|
||||
var ret = RepositorioPropiedades.Singleton.BajaPropiedad(id, cli.Dni);
|
||||
return ret ?
|
||||
Ok(new {message = "Se cambio el estado de la propiedad"}): BadRequest(new { message = "No se pudo dar de baja"});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user