public IActionResult RemoveLike([FromBody] RecipeLikeRequestModel request) { var userId = Convert.ToInt32(User.FindFirst("Id").Value); recipeLikesService.RemoveLike(request.RecipeId, userId); return(Ok()); }
public async Task <IActionResult> RemoveLike([FromBody] RecipeLikeRequestModel request) { var user = await userManager.GetUserAsync(User); recipeLikesService.RemoveLike(request.RecipeId, user.Id); return(Ok()); }