Ejemplo n.º 1
0
        public IActionResult GetCashBack()
        {
            var id     = HttpContext.User.Claims.Where(x => x.Type.Equals("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name")).FirstOrDefault().Value;
            var result = _sellerService.GetCashBack(id);

            if (result.Sucess)
            {
                return(new ObjectResult(result));
            }
            else
            {
                var resultError = new ObjectResult(result);
                resultError.StatusCode = result.Error.FirstOrDefault().Code;
                return(resultError);
            }
        }