This commit is contained in:
2020-07-24 18:19:29 +00:00
parent 87ec492b29
commit ea3bc198a0
5 changed files with 22 additions and 14 deletions

View File

@@ -125,7 +125,17 @@ namespace AyaNova.Api.Controllers
return BadRequest(new ApiErrorResponse(ModelState));
}
var ret = await ct.NotifyEvent.Select(z => new { z.Id, z.Created, z.EventDate, z.UserId, z.EventType, z.AyaType, z.Name }).ToListAsync();
var ret = await ct.NotifyEvent.Include(z => z.NotifySubscription).Select(z => new
{
z.Id,
z.Created,
z.EventDate,
DeliverAfter = (z.EventDate + z.NotifySubscription.AgeValue - z.NotifySubscription.AdvanceNotice),
z.UserId,
z.EventType,
z.AyaType,
z.Name
}).ToListAsync();
return Ok(ApiOkResponse.Response(ret));
}