public IActionResult RemoveDownvote(int id) { var token = HttpContext.Request.Cookies["user-token"]; var myprofile = _profileRepository.GetUserByToken(token); var reaction = _reactionRepository.FindReactionDown(myprofile.Id, id); _reactionRepository.RemoveReaction(reaction); var notifyToDelete = _reactionRepository.GetNotificationByReaction($"{this.Request.Scheme}://{this.Request.Host}{this.Request.PathBase}/post/index/" + id, myprofile.FullName); if (notifyToDelete == null) { return(Ok()); } _reactionRepository.RemoveNotify(notifyToDelete); return(Ok(notifyToDelete)); }