termine lo que corresponde a logear los contratos
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user