Display chapter reviews in volume page
This commit is contained in:
parent
85b6f107bc
commit
e0b27f464f
10 changed files with 124 additions and 36 deletions
|
|
@ -1,9 +1,11 @@
|
|||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using API.Constants;
|
||||
using API.Data;
|
||||
using API.Data.Repositories;
|
||||
using API.DTOs;
|
||||
using API.DTOs.SeriesDetail;
|
||||
using API.Extensions;
|
||||
using API.Services;
|
||||
using API.SignalR;
|
||||
|
|
@ -81,4 +83,15 @@ public class VolumeController : BaseApiController
|
|||
|
||||
return Ok(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns all reviews related to this volume, that is, the union of reviews of this volumes chapters
|
||||
/// </summary>
|
||||
/// <param name="volumeId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("review")]
|
||||
public async Task<IList<UserReviewDto>> VolumeReviews([FromQuery] int volumeId)
|
||||
{
|
||||
return await _unitOfWork.UserRepository.GetUserRatingDtosForVolumeAsync(volumeId, User.GetUserId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue