diff --git a/RMuseum/Controllers/GanjoorController.cs b/RMuseum/Controllers/GanjoorController.cs index 817e0e0a..83ca434f 100644 --- a/RMuseum/Controllers/GanjoorController.cs +++ b/RMuseum/Controllers/GanjoorController.cs @@ -20,16 +20,17 @@ namespace RMuseum.Controllers /// get list of poets /// /// + /// /// [HttpGet] [Route("poets")] [AllowAnonymous] [ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(GanjoorPoetViewModel[]))] [ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))] - public async Task GetPoets(bool websitePoets = true) + public async Task GetPoets(bool websitePoets = true, bool includeBio = true) { RServiceResult res = - await _ganjoorService.GetPoets(websitePoets); + await _ganjoorService.GetPoets(websitePoets, includeBio); if (!string.IsNullOrEmpty(res.ExceptionString)) return BadRequest(res.ExceptionString); return Ok(res.Result); diff --git a/RMuseum/RMuseum.xml b/RMuseum/RMuseum.xml index ff913e34..85df5fbf 100644 --- a/RMuseum/RMuseum.xml +++ b/RMuseum/RMuseum.xml @@ -615,11 +615,12 @@ - + get list of poets + @@ -4656,11 +4657,12 @@ Ganjoor Poems Content Privider Service - + Get List of poets + @@ -5425,11 +5427,12 @@ IGanjoorService implementation - + Get List of poets + diff --git a/RMuseum/Services/IGanjoorService.cs b/RMuseum/Services/IGanjoorService.cs index 197bec36..f82f624b 100644 --- a/RMuseum/Services/IGanjoorService.cs +++ b/RMuseum/Services/IGanjoorService.cs @@ -16,8 +16,9 @@ namespace RMuseum.Services /// Get List of poets /// /// + /// /// - Task> GetPoets(bool websitePoets); + Task> GetPoets(bool websitePoets, bool includeBio = true); /// /// get poet by id diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs index 9b1c1219..d7339313 100644 --- a/RMuseum/Services/Implementation/GanjoorService.cs +++ b/RMuseum/Services/Implementation/GanjoorService.cs @@ -29,8 +29,9 @@ namespace RMuseum.Services.Implementation /// Get List of poets /// /// + /// /// - public async Task> GetPoets(bool websitePoets) + public async Task> GetPoets(bool websitePoets, bool includeBio = true) { try { @@ -45,7 +46,7 @@ namespace RMuseum.Services.Implementation { Id = poet.Id, Name = poet.Name, - Description = poet.Description, + Description = includeBio ? poet.Description : null, FullUrl = cat.FullUrl, RootCatId = cat.Id }