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));
        }
Esempio n. 2
0
 public void SaveReview(SavedReview savedReview)
 {
     _context.SavedReview.Add(savedReview);
     _context.SaveChanges();
 }