docs: #352 including poem geo tags in poems model

This commit is contained in:
Hamid Reza Mohammadi 2022-08-04 15:05:35 +04:30
parent 304e448aef
commit 716ab67f66
3 changed files with 19 additions and 2 deletions

View File

@ -121,5 +121,10 @@ namespace RMuseum.Models.Ganjoor.ViewModels
/// poem sections
/// </summary>
public GanjoorPoemSection[] Sections { get; set; }
/// <summary>
/// geo/date tags
/// </summary>
public PoemGeoDateTag[] GeoDateTags { get; set; }
}
}

View File

@ -9272,6 +9272,11 @@
poem sections
</summary>
</member>
<member name="P:RMuseum.Models.Ganjoor.ViewModels.GanjoorPoemCompleteViewModel.GeoDateTags">
<summary>
geo/date tags
</summary>
</member>
<member name="T:RMuseum.Models.Ganjoor.ViewModels.GanjoorPoemCorrectionViewModel">
<summary>
poem correction view model

View File

@ -1702,6 +1702,12 @@ namespace RMuseum.Services.Implementation
poemSections = poemSectionsRes.Result;
}
var tagsRes = await GetPoemGeoDateTagsAsync(id);
if (!string.IsNullOrEmpty(tagsRes.ExceptionString))
return new RServiceResult<GanjoorPoemCompleteViewModel>(null, tagsRes.ExceptionString);
PoemGeoDateTag[] geoDateTags = tagsRes.Result;
poemViewModel = new GanjoorPoemCompleteViewModel()
{
@ -1712,7 +1718,7 @@ namespace RMuseum.Services.Implementation
UrlSlug = poem.UrlSlug,
HtmlText = poem.HtmlText,
PlainText = poem.PlainText,
SourceName = poem.SourceName,
SourceUrlSlug = poem.SourceUrlSlug,
OldTag = poem.OldTag,
@ -1728,7 +1734,8 @@ namespace RMuseum.Services.Implementation
Verses = verses,
Songs = tracks,
Comments = poemComments,
Sections = poemSections
Sections = poemSections,
GeoDateTags = geoDateTags
};
if (AggressiveCacheEnabled)