termine lo que corresponde a logear los contratos

This commit is contained in:
2025-01-13 17:59:21 -03:00
parent 062b97515f
commit a19d2b2a42
5 changed files with 51 additions and 6 deletions

View File

@@ -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) {