fix(api): StatRobotTaskController GetPeriodStatistics fix NoContent
This commit is contained in:
@@ -109,19 +109,13 @@ namespace PARR.API.Controllers.V1.Statistics
|
||||
|
||||
var statistics = await query.ToListAsync();
|
||||
|
||||
if (!statistics.Any())
|
||||
return NoContent();
|
||||
//if (!statistics.Any())
|
||||
// return NoContent();
|
||||
|
||||
var periodList = GetPeriodList(queryDate, DateTimeOffset.UtcNow);
|
||||
|
||||
//var response = statistics.Select(t => new StatRobotTaskPeriodResponse
|
||||
//{
|
||||
// Date = new DateTimeOffset(t.Date.Date.Year, t.Date.Date.Month, t.Date.Date.Day, t.Date.Hour, 0, 0, new TimeSpan(0)),
|
||||
// Creating = t.Creating,
|
||||
// Errors = t.Errors,
|
||||
// Ok = t.Ok,
|
||||
// Updating = t.Updating
|
||||
//}).OrderBy(t => t.Date).ToList();
|
||||
if (!periodList.Any())
|
||||
return NoContent();
|
||||
|
||||
periodList.ForEach(item =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user