mirror of
https://github.com/Readarr/Readarr
synced 2026-05-09 05:21:41 +02:00
use Id instead of time to sort logs to take advantage of built in index.
This commit is contained in:
parent
add4c38589
commit
aa2c96ec7d
1 changed files with 6 additions and 0 deletions
|
|
@ -17,6 +17,12 @@ public LogModule(ILogService logService)
|
||||||
private PagingResource<LogResource> GetLogs(PagingResource<LogResource> pagingResource)
|
private PagingResource<LogResource> GetLogs(PagingResource<LogResource> pagingResource)
|
||||||
{
|
{
|
||||||
var pageSpec = pagingResource.InjectTo<PagingSpec<Log>>();
|
var pageSpec = pagingResource.InjectTo<PagingSpec<Log>>();
|
||||||
|
|
||||||
|
if (pageSpec.SortKey == "time")
|
||||||
|
{
|
||||||
|
pageSpec.SortKey = "id";
|
||||||
|
}
|
||||||
|
|
||||||
return ApplyToPage(_logService.Paged, pageSpec);
|
return ApplyToPage(_logService.Paged, pageSpec);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue