public IActionResult CreateWish(WishCreateDTO wish) { try { WishCreateDTO newWish = new WishCreateDTO(); try { newWish.IdUsuario = Convert.ToInt32(HttpContext.User.Claims.First(c => c.Type == JwtRegisteredClaimNames.Jti).Value); }catch (Exception ex) { throw new Exception("Erro no carregamento, usuário não encontrado"); } newWish.descwish = wish.descwish; _service.CreateWish(newWish); } catch (Exception ex) { return(BadRequest(ex.Message)); } return(Ok()); }