Merge pull request #208 from microsoft/jamesmontemagno-patch-3

Show more shows on category pages
pull/212/head
James Montemagno 2023-02-01 16:39:27 -08:00 committed by GitHub
commit 33359c3641
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@ public class ShowsService
public async Task<IEnumerable<Show>> GetShowsByCategoryAsync(Guid idCategory) public async Task<IEnumerable<Show>> GetShowsByCategoryAsync(Guid idCategory)
{ {
var result = new List<Show>(); var result = new List<Show>();
var showsResponse = await TryGetAsync<IEnumerable<ShowResponse>>($"shows?limit=10&categoryId={idCategory}"); var showsResponse = await TryGetAsync<IEnumerable<ShowResponse>>($"shows?limit=20&categoryId={idCategory}");
if (showsResponse == null) if (showsResponse == null)
return result; return result;
@ -58,14 +58,14 @@ public class ShowsService
public async Task<IEnumerable<Show>> SearchShowsAsync(Guid idCategory, string term) public async Task<IEnumerable<Show>> SearchShowsAsync(Guid idCategory, string term)
{ {
var showsResponse = await TryGetAsync<IEnumerable<ShowResponse>>($"shows?limit=10&categoryId={idCategory}&term={term}"); var showsResponse = await TryGetAsync<IEnumerable<ShowResponse>>($"shows?limit=20&categoryId={idCategory}&term={term}");
return showsResponse?.Select(response => GetShow(response)); return showsResponse?.Select(response => GetShow(response));
} }
public async Task<IEnumerable<Show>> SearchShowsAsync(string term) public async Task<IEnumerable<Show>> SearchShowsAsync(string term)
{ {
var showsResponse = await TryGetAsync<IEnumerable<ShowResponse>>($"shows?limit=10&term={term}"); var showsResponse = await TryGetAsync<IEnumerable<ShowResponse>>($"shows?limit=20&term={term}");
return showsResponse?.Select(response => GetShow(response)); return showsResponse?.Select(response => GetShow(response));
} }

View File

@ -36,7 +36,7 @@ else
} }
@code { @code {
private const int ItemsPerCategory = 10; private const int ItemsPerCategory = 20;
[Parameter] [Parameter]
public Guid Id { get; set; } public Guid Id { get; set; }