예제 #1
0
        public async Task <ResponseWrapper <string> > Sell(string id)
        {
            try
            {
                var budget = await fantasySoccerService.SellFutbolPlayerAsync(id);

                return(new ResponseWrapper <string>
                {
                    StatusCode = Models.Responses.StatusCode.OK,
                    Response = budget,
                    Message = "The sale has been registered successfully"
                });
            }
            catch
            {
                return(new ResponseWrapper <string>
                {
                    StatusCode = Models.Responses.StatusCode.BadRequest,
                    Message = "Couldn't sell the player. \nTry again later"
                });
            }
        }