LibraryItemAPI: Fixing dual / in page responses

This commit is contained in:
Zoe Roux 2021-08-14 20:44:59 +02:00
parent e0f96d0b56
commit e93b48bc53
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ namespace Kyoo.Api
protected Page<TResult> Page<TResult>(ICollection<TResult> resources, int limit) protected Page<TResult> Page<TResult>(ICollection<TResult> resources, int limit)
where TResult : IResource where TResult : IResource
{ {
return new Page<TResult>(resources, return new Page<TResult>(resources,
new Uri(BaseURL, Request.Path), new Uri(BaseURL, Request.Path),
Request.Query.ToDictionary(x => x.Key, x => x.Value.ToString(), StringComparer.InvariantCultureIgnoreCase), Request.Query.ToDictionary(x => x.Key, x => x.Value.ToString(), StringComparer.InvariantCultureIgnoreCase),
limit); limit);

View File

@ -43,7 +43,7 @@ namespace Kyoo.Api
new Pagination(limit, afterID)); new Pagination(limit, afterID));
return new Page<LibraryItem>(resources, return new Page<LibraryItem>(resources,
new Uri(_baseURL + Request.Path), new Uri(_baseURL, Request.Path),
Request.Query.ToDictionary(x => x.Key, x => x.Value.ToString(), StringComparer.InvariantCultureIgnoreCase), Request.Query.ToDictionary(x => x.Key, x => x.Value.ToString(), StringComparer.InvariantCultureIgnoreCase),
limit); limit);
} }