#445 display poems list

This commit is contained in:
Hamid Reza Mohammadi 2024-07-20 19:36:56 +03:30
parent 41c8138f34
commit accb8c9402
2 changed files with 8 additions and 1 deletions

View File

@ -47,6 +47,13 @@
<a href="@cat.FullUrl">@cat.TajikTitle</a>
</p>
}
@foreach (var poem in Model.GanjoorPage.PoetOrCat.Cat.Poems)
{
<p>
<a href="@($"{Model.GanjoorPage.PoetOrCat.Cat}/{poem.UrlSlug}")">@poem.TajikTitle</a>
</p>
}
}
</div>

View File

@ -42,7 +42,7 @@ namespace TajikGanjoor.Pages
IsHomePage = Request.Path == "/";
if (!IsHomePage)
{
var pageQuery = await _httpClient.GetAsync($"{APIRoot.Url}/api/ganjoor/page?url={Request.Path}");
var pageQuery = await _httpClient.GetAsync($"{APIRoot.Url}/api/ganjoor/page?url={Request.Path}&catPoems=true");
if (!pageQuery.IsSuccessStatusCode)
{
if (pageQuery.StatusCode == HttpStatusCode.NotFound)