From 8f098f31ecf76cd0b42bca79ef333a8e313d26cf Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Fri, 28 Mar 2025 12:35:31 +0330 Subject: [PATCH] #478 recitations --- .../ContributionStatsController.cs | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/RMuseum/Controllers/ContributionStatsController.cs b/RMuseum/Controllers/ContributionStatsController.cs index 900ba3cf..378afc24 100644 --- a/RMuseum/Controllers/ContributionStatsController.cs +++ b/RMuseum/Controllers/ContributionStatsController.cs @@ -29,6 +29,7 @@ namespace RMuseum.Controllers /// suggestedsongs /// quoteds /// comments + /// recitations /// /// /// @@ -92,6 +93,14 @@ namespace RMuseum.Controllers pagedResult = res.Result; } break; + case "recitations": + { + var res = await _service.GetApprovedRecitationsGroupedByDateAsync(paging, userId); + if (!string.IsNullOrEmpty(res.ExceptionString)) + return BadRequest(res.ExceptionString); + pagedResult = res.Result; + } + break; default: return BadRequest($"Invalid value for the paramater: dataType = {dataType}"); } @@ -113,6 +122,7 @@ namespace RMuseum.Controllers /// suggestedsongs /// quoteds /// comments + /// recitations /// /// /// @@ -176,6 +186,15 @@ namespace RMuseum.Controllers return BadRequest(res.ExceptionString); pagedResult = res.Result; } + break; + case "recitations": + { + var res = await _service.GetApprovedRecitationsGroupedByUserAsync(paging, day, userId); + if (!string.IsNullOrEmpty(res.ExceptionString)) + return BadRequest(res.ExceptionString); + pagedResult = res.Result; + } + break; default: return BadRequest($"Invalid value for the paramater: dataType = {dataType}"); @@ -199,6 +218,7 @@ namespace RMuseum.Controllers /// suggestedsongs /// quoteds /// comments + /// recitations /// /// [HttpGet("{dataType}")] @@ -258,6 +278,15 @@ namespace RMuseum.Controllers return BadRequest(res.ExceptionString); result = res.Result; } + break; + case "recitations": + { + var res = await _service.GetApprovedRecitationsSummedUpStatsAsync(); + if (!string.IsNullOrEmpty(res.ExceptionString)) + return BadRequest(res.ExceptionString); + result = res.Result; + } + break; default: return BadRequest($"Invalid value for the paramater: dataType = {dataType}");