diff --git a/Aspnet/Controllers/NotificacionesController.cs b/Aspnet/Controllers/NotificacionesController.cs index 1eb040e..fa8a141 100644 --- a/Aspnet/Controllers/NotificacionesController.cs +++ b/Aspnet/Controllers/NotificacionesController.cs @@ -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) { diff --git a/Front/src/Componentes/ModalVeryAceptarContrato.svelte b/Front/src/Componentes/ModalVeryAceptarContrato.svelte index a9e8913..92cbbd4 100644 --- a/Front/src/Componentes/ModalVeryAceptarContrato.svelte +++ b/Front/src/Componentes/ModalVeryAceptarContrato.svelte @@ -41,7 +41,7 @@