Ejemplo n.º 1
0
        public async Task <IActionResult> AddWish([FromBody] WishDto wish)
        {
            try
            {
                if (!ModelState.IsValid)
                {
                    return(BadRequest("Invalid model object"));
                }

                await _wishService.AddWishAsync(wish);

                return(Ok());
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex.Message));
            }
        }