Пример #1
0
        public ActionResult <string> DeleteOrder([FromBody] OrderDeleteModel odModel)
        {
            System.Console.WriteLine("hellow??asdfasdfasfdasf");
            Customer customerOut;
            bool     sdfs = _authenticator.InnerValidate(odModel.token, out customerOut);

            if (sdfs == true)
            {
                System.Console.WriteLine("token: " + customerOut.CustomerToken);
                System.Console.WriteLine("log orderModel:");
                System.Console.WriteLine(odModel);
                if (_orderLogic.DeleteStackFromOrder(customerOut, odModel))
                {
                    return(JsonConvert.SerializeObject(customerOut,
                                                       new Newtonsoft.Json.JsonSerializerSettings()
                    {
                        ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore
                    }));
                }
                else
                {
                    return(StatusCode(401));
                }
            }
            return(StatusCode(401));
        }