public async Task <ActionResult <bool> > DeleteReview(DeleteReviewInputModel input) { var userId = this.User.FindFirstValue(ClaimTypes.NameIdentifier); await this.reviewsService.DeleteReviewAsync(input.ReviewNumber, userId); return(true); }
public async Task <IActionResult> Delete(DeleteReviewInputModel model) { try { await this.reviewService.DeleteReviewsAsync(model.Id); } catch (ArgumentException ex) { return(this.RedirectToAction("Home", "Error404")); } return(this.RedirectToAction("Details", new { id = model.GameId, pageNumber = 1 })); }