Implemented ability to leave a rating (up to 5 stars) and a text review (not UI supported until v0.2).
This commit is contained in:
parent
767f835e7b
commit
ac993a59ba
13 changed files with 822 additions and 28 deletions
|
@ -48,6 +48,17 @@ namespace API.Data
|
|||
return await _userManager.GetUsersInRoleAsync(PolicyConstants.AdminRole);
|
||||
}
|
||||
|
||||
public async Task<AppUserRating> GetUserRating(int seriesId, int userId)
|
||||
{
|
||||
return await _context.AppUserRating.Where(r => r.SeriesId == seriesId && r.AppUserId == userId)
|
||||
.SingleOrDefaultAsync();
|
||||
}
|
||||
|
||||
public void AddRatingTracking(AppUserRating userRating)
|
||||
{
|
||||
_context.AppUserRating.Add(userRating);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<MemberDto>> GetMembersAsync()
|
||||
{
|
||||
return await _context.Users
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue