Unify ChapterRating with Rating

This commit is contained in:
Amelia 2025-04-26 20:20:14 +02:00
parent a9e2937651
commit f29c63c6c4
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
34 changed files with 266 additions and 679 deletions

View file

@ -191,21 +191,6 @@ public class SeriesController : BaseApiController
return Ok(await _unitOfWork.ChapterRepository.GetChapterMetadataDtoAsync(chapterId));
}
/// <summary>
/// Update the user rating for the given series
/// </summary>
/// <param name="updateSeriesRatingDto"></param>
/// <returns></returns>
[HttpPost("update-rating")]
public async Task<ActionResult> UpdateSeriesRating(UpdateSeriesRatingDto updateSeriesRatingDto)
{
var user = await _unitOfWork.UserRepository.GetUserByUsernameAsync(User.GetUsername(), AppUserIncludes.Ratings);
if (!await _seriesService.UpdateRating(user!, updateSeriesRatingDto))
return BadRequest(await _localizationService.Translate(User.GetUserId(), "generic-error"));
return Ok();
}
/// <summary>
/// Updates the Series
/// </summary>