#478 ContributionStatsController

This commit is contained in:
Hamid Reza Mohammadi 2025-03-26 21:11:51 +03:30
parent 4115089504
commit e60a5978c9
2 changed files with 24 additions and 0 deletions

View File

@ -61,6 +61,24 @@ namespace RMuseum.Controllers
return Ok(pagedResult.Result.Tracks);
}
/// <summary>
/// summed up stats of approved poem corrections
/// </summary>
/// <returns></returns>
[HttpGet("poem/corrections")]
[AllowAnonymous]
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(SummedUpViewModel))]
[ProducesResponseType((int)HttpStatusCode.BadRequest, Type = typeof(string))]
public async Task<IActionResult> GetApprrovedEditsSummedUpStatsAsync()
{
var res = await _service.GetApprrovedEditsSummedUpStatsAsync();
if (!string.IsNullOrEmpty(res.ExceptionString))
return BadRequest(res.ExceptionString);
return Ok(res.Result);
}
/// <summary>
/// service
/// </summary>

View File

@ -779,6 +779,12 @@
<param name="userId"></param>
<returns></returns>
</member>
<member name="M:RMuseum.Controllers.ContributionStatsController.GetApprrovedEditsSummedUpStatsAsync">
<summary>
summed up stats of approved poem corrections
</summary>
<returns></returns>
</member>
<member name="F:RMuseum.Controllers.ContributionStatsController._service">
<summary>
service