V13: Audit log controller (#13842)
* Implement AuditLogByTypeViewModel * Add GetLogs endpoint * Implement AuditLogViewModelFactory and use it * Remove mapping and do that in ViewModelFactory * Add Skip take pagination to AuditService.cs * Get entity key from repository * Only create filter if sincedate has value * Refactor to handle enitity not being found * Add by type route * Rename AuditLogViewModel.cs * Add CreateAuditLogWithUsernameViewModel method to factory * Rename method in factory * Fix up controllers to use async service * Refactor to use pagedModel * Update sincedate query * Add FIXME * Move entity call in scope * Rename methods to async * Update src/Umbraco.Core/PaginationHelper.cs * Refactor to use IActionResult * Audit log in two words * Fix up by key * Fix routing * Fix ByType * Update ByType routing * Refactor to also pass DateStamp * Add Key to WithUserNameViewModel * Refactor extension method to call new GetAsync method * use new GetAsync method * Rename models and implement base class * Update OpenApi.json --------- Co-authored-by: Zeegaan <nge@umbraco.dk> Co-authored-by: Nikolaj <nikolajlauridsen@protonmail.ch>
This commit is contained in:
@@ -29,7 +29,7 @@ internal class AuditRepository : EntityRepositoryBase<int, IAuditItem>, IAuditRe
|
||||
|
||||
List<LogDto>? dtos = Database.Fetch<LogDto>(sql);
|
||||
|
||||
return dtos.Select(x => new AuditItem(x.NodeId, Enum<AuditType>.Parse(x.Header), x.UserId ?? Constants.Security.UnknownUserId, x.EntityType, x.Comment, x.Parameters)).ToList();
|
||||
return dtos.Select(x => new AuditItem(x.NodeId, Enum<AuditType>.Parse(x.Header), x.UserId ?? Constants.Security.UnknownUserId, x.EntityType, x.Comment, x.Parameters, x.Datestamp)).ToList();
|
||||
}
|
||||
|
||||
public void CleanLogs(int maximumAgeOfLogsInMinutes)
|
||||
|
||||
Reference in New Issue
Block a user