Пример #1
0
        public async Task <IActionResult> CreateOrder([FromBody] AccessTokenModel model, Guid orgGuid)
        {
            IAccessToken accessToken = await m_token_service.GetToken(model.Token);

            if (accessToken == null || accessToken.HasExpired)
            {
                return(BadRequest());
            }

            IRetailOrder order = await m_order_processing.CreateNewOrder(accessToken.User, orgGuid);

            return(Ok(new OrderModel(accessToken, order)));
        }