public IHttpActionResult Follow(InterestDto dto) { var followerId = User.Identity.GetUserId(); if (_interestRepository.IsInterested(dto.IdeaId, followerId)) { return(BadRequest("You are already interested in this Idea")); } _interestRepository.Add(dto.IdeaId, followerId); return(Ok()); }
public IActionResult AddInterests(Interest interest) { _repo.Add(interest); return(Created($"api/interests/{interest.Id}", interest)); }