Quick scan over GH diff fixes

This commit is contained in:
Amelia 2025-04-28 17:36:53 +02:00
parent 184cf46533
commit 41faa30e6f
No known key found for this signature in database
GPG key ID: D6D0ECE365407EAA
3 changed files with 2 additions and 7 deletions

View file

@ -36,7 +36,7 @@ public class RatingController : BaseApiController
[HttpPost]
public async Task<ActionResult> UpdateRating(UpdateRatingDto updateRating)
{
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(User.GetUserId(), AppUserIncludes.Ratings);
var user = await _unitOfWork.UserRepository.GetUserByIdAsync(User.GetUserId(), AppUserIncludes.Ratings | AppUserIncludes.ChapterRatings);
if (user == null) throw new UnauthorizedAccessException();
if (await _ratingService.UpdateRating(user, updateRating))

View file

@ -38,7 +38,7 @@ public class UserReviewDto
/// </summary>
public string Username { get; set; }
public int TotalVotes { get; set; }
public bool HasBeenRated { get; set; }
public float Rating { get; set; }
public string? RawBody { get; set; }
/// <summary>
/// How many upvotes this review has gotten

View file

@ -3,7 +3,6 @@ import {environment} from "../../environments/environment";
import { HttpClient } from "@angular/common/http";
import {Volume} from "../_models/volume";
import {TextResonse} from "../_types/text-response";
import {UserReview} from "../_single-module/review-card/user-review";
@Injectable({
providedIn: 'root'
@ -30,8 +29,4 @@ export class VolumeService {
return this.httpClient.post(this.baseUrl + 'volume/update', volume, TextResonse);
}
volumeReviews(volumeId: number) {
return this.httpClient.get<UserReview[]>(this.baseUrl + 'volume/review?volumeId='+volumeId);
}
}