[Authorize]//like ValuesController.cs public IActionResult AddFavBeer([FromBody] int beerId) { // Assume the user is not authorized IActionResult result = Unauthorized();//Can we say a message like 'log in to favorite' //Get User for ID to search the user/beer table User user = userDao.GetUser(User.Identity.Name); if (user != null) { // add the favorite beer/user combo to the databse //userDao.AddFavoriteBeer(user.Id, beerId); userDao.AddFavoriteBeer(user.Id, beerId); // Switch to 200 OK result = Ok(); } return(result); }