Beispiel #1
0
        public Message Put(int idDelivery, [FromBody] Delivery deliveryUpdate)
        {
            //token do user logado
            string token = Request.Headers["token"];

            int[] userLoggedIn = UserService.UserLoggedIn(token);

            if (userLoggedIn != null)
            {
                return(DeliveryService.ChangeDeliveryState(userLoggedIn[0], deliveryUpdate, idDelivery));
            }
            else
            {
                return(MessageService.AccessDenied());
            }
        }