Beispiel #1
0
        public IActionResult UpdateRating(int id)
        {
            try
            {
                if (HttpContext.Request.Headers["X-Requested-With"] != "XMLHttpRequest")
                {
                    return(NotFound());
                }

                _giftService.IncreaseRating(id);
                return(Ok());
            }
            catch (Exception e)
            {
                return(BadRequest(e.Message));
            }
        }