termine lo que corresponde a logear los contratos

This commit is contained in:
fede committed 2025-01-13 17:59:21 -03:00
1 parent 062b97515f
commit a19d2b2a42
5 files changed
+51 -6

No files matched your search

@@ -34,6 +34,16 @@ public class NotificacionesController: ControllerBase {
return Ok(noti);
}
[HttpGet("api/notificaciones/haySinLeer")]
public IActionResult GetHayNotis([FromHeader(Name ="Auth")]string Auth) {
if (String.IsNullOrWhiteSpace(Auth)) return Unauthorized();
var cli = RepositorioUsuarios.Singleton.ObtenerClientePorToken(Auth);
if (cli == null) return BadRequest(new {message = "Fallo al intentar encontrar tu usuario (puede que te hayas logeado desde otro dispositivo?)"});
bool ret = RepositorioNotificaciones.Singleton.HayNotis(cli.Dni);
return Ok(new {message = ret});
}
[HttpPut("api/notificaciones")]
public IActionResult MarcarComoLeido([FromHeader(Name = "Auth")]string Auth, NotificacionMarcarLeidoDto nota) {