mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-07-29 08:28:39 +00:00
Fix error codes 403->400
This commit is contained in:
parent
abfb1c4cd8
commit
ed1eac696a
1 changed files with 2 additions and 2 deletions
|
@ -204,10 +204,10 @@ namespace LBPUnion.ProjectLighthouse.Controllers
|
|||
if (user == null) return this.StatusCode(403, "");
|
||||
|
||||
User? reviewer = await this.database.Users.FirstOrDefaultAsync(u => u.Username == username);
|
||||
if (reviewer == null) return this.StatusCode(403, "");
|
||||
if (reviewer == null) return this.StatusCode(400, "");
|
||||
|
||||
Review? review = await this.database.Reviews.FirstOrDefaultAsync(r => r.SlotId == slotId && r.ReviewerId == reviewer.UserId);
|
||||
if (review == null) return this.StatusCode(403, "");
|
||||
if (review == null) return this.StatusCode(400, "");
|
||||
|
||||
RatedReview? ratedReview = await this.database.RatedReviews.FirstOrDefaultAsync(r => r.ReviewId == review.ReviewId && r.UserId == user.UserId);
|
||||
if (ratedReview == null)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue