This commit is contained in:
@@ -43,7 +43,7 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get event log for object and date range specified
|
||||
@@ -66,12 +66,8 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(401, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
|
||||
var result = await EventLogProcessor.GetLogForObject(opt.AyId, UserLocaleIdFromContext.LocaleId(HttpContext.Items), ct);
|
||||
|
||||
//Log
|
||||
EventLogProcessor.AddEntry(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.Metrics, AyaEvent.Retrieved), ct);
|
||||
|
||||
return Content(result);
|
||||
var result = await EventLogProcessor.GetLogForObject(opt, ct);
|
||||
return Ok(new ApiOkResponse(result));
|
||||
}
|
||||
|
||||
|
||||
@@ -106,12 +102,9 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(401, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
|
||||
var result = await EventLogProcessor.GetLogForUser(opt.AyId, UserLocaleIdFromContext.LocaleId(HttpContext.Items), ct);
|
||||
var result = await EventLogProcessor.GetLogForUser(opt, ct);
|
||||
|
||||
//Log
|
||||
EventLogProcessor.AddEntry(new Event(UserId, 0, AyaType.Metrics, AyaEvent.Retrieved), ct);
|
||||
|
||||
return Content(result);
|
||||
return Ok(new ApiOkResponse(result));
|
||||
}
|
||||
|
||||
|
||||
@@ -127,10 +120,32 @@ namespace AyaNova.Api.Controllers
|
||||
[FromQuery]
|
||||
public long AyId { get; set; }
|
||||
[FromQuery]
|
||||
public DateTime StartDate { get; set; }
|
||||
public DateTime? StartDate { get; set; }
|
||||
[FromQuery]
|
||||
public DateTime EndDate { get; set; }
|
||||
public DateTime? EndDate { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
public sealed class ObjectEventLogItem
|
||||
{
|
||||
//DateTime, UserId, Event, Textra
|
||||
public DateTime Date { get; set; }
|
||||
public long UserId { get; set; }
|
||||
public AyaEvent Event { get; set; }
|
||||
public string Textra { get; set; }
|
||||
}
|
||||
|
||||
public sealed class UserEventLogItem
|
||||
{
|
||||
//DateTime, ObjectType, ObjectId, Event, Textra
|
||||
public DateTime Date { get; set; }
|
||||
public AyaType Type { get; set; }
|
||||
public long ObjectId { get; set; }
|
||||
public AyaEvent Event { get; set; }
|
||||
public string Textra { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}//eoc
|
||||
}//eons
|
||||
Reference in New Issue
Block a user