public IActionResult Post(SavedReview savedReview) { var currentUserProfile = GetCurrentUserProfile(); if (currentUserProfile.Id != savedReview.UserProfileId) { return(Unauthorized()); } _reviewPostRepository.SaveReview(savedReview); return(CreatedAtAction("Get", new { id = savedReview.Id }, savedReview)); }
public void SaveReview(SavedReview savedReview) { _context.SavedReview.Add(savedReview); _context.SaveChanges(); }