falta mirar en la base de datos si guardo el tipo de moneda

This commit is contained in:
2025-01-14 04:13:13 -03:00
parent 7565e21df8
commit 013744d129
15 changed files with 131 additions and 43 deletions

View File

@@ -15,22 +15,25 @@ public class NotificacionesController: ControllerBase {
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?)"});
IQueryable<Notificacione> notificaciones = RepositorioNotificaciones.Singleton.ObtenerNotificacionesDeUsuario(cli.Dni)
.Where(x=>x.Leido == leido);
List<NotificacionDto> noti = new();
Parallel.ForEach(notificaciones, i => {
foreach (Notificacione i in notificaciones) {
if(i.DniclienteNavigation == null || i.DniremitenteNavigation==null) return BadRequest(new { message = "Esta mal cargado el precontrato"});
var dto = new NotificacionDtoBuilder()
.SetRemitente(i.DniremitenteNavigation.Email)
.SetAccion(i.Accion)
.SetMensaje(i.Mensaje)
.SetRemitente(i.DniremitenteNavigation.Email??"")
.SetAccion(i.Accion??"")
.SetMensaje(i.Mensaje??"")
.SetFecha(i.Fecha)
.SetPropiedad(i.IdpropiedadNavigation.Id.ToString())
.SetReceptor(i.DniclienteNavigation.Email)
.SetPropiedad(i.Idpropiedad.ToString()??"")
.SetReceptor(i.DniclienteNavigation.Email??"")
.Build();
noti.Add(dto);
});
}
return Ok(noti);
}