diff --git a/GanjooRazor/Pages/Index.cshtml.cs b/GanjooRazor/Pages/Index.cshtml.cs index 72e583e7..bea1b5d9 100644 --- a/GanjooRazor/Pages/Index.cshtml.cs +++ b/GanjooRazor/Pages/Index.cshtml.cs @@ -305,6 +305,12 @@ namespace GanjooRazor.Pages /// public bool ShowAllRecitaions { get; set; } + + /// + /// category poem geo date tags + /// + public PoemGeoDateTag[] CategoryPoemGeoDateTags { get; set; } + /// /// prepare poem except /// @@ -782,6 +788,18 @@ namespace GanjooRazor.Pages ViewData["BrearCrumpList"] = breadCrumbList.ToString(); + if(IsCatPage) + { + var tagsResponse = await _httpClient.GetAsync($"{APIRoot.Url}/api/ganjoor/cat/{GanjoorPage.PoetOrCat.Cat.Id}/geotag"); + if (!tagsResponse.IsSuccessStatusCode) + { + LastError = JsonConvert.DeserializeObject(await tagsResponse.Content.ReadAsStringAsync()); + return Page(); + } + + CategoryPoemGeoDateTags = JsonConvert.DeserializeObject(await tagsResponse.Content.ReadAsStringAsync()); + } + return Page(); }