Ejemplo n.º 1
0
        public async Task <IActionResult> AddTracking(AddTrackingViewModel tracking)
        {
            var ticket = await ticketsService.GetTicketById(tracking.TicketId);

            var order = await ordersService.GetOrderByTicketIdAndStatuses(ticket.Id, OrderStatuses.Confirmed);

            await ordersService.ChangeOrderTracking(order, tracking.TrackingNumber);

            return(View("InstructionTrackingAdded"));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> AddTracking([FromBody] TrackingResource trackingResourse)
        {
            var ticket = await ticketsService.GetTicketById(trackingResourse.ticketId);

            var order = await ordersService.GetOrderByTicketIdAndStatuses(ticket.Id, OrderStatuses.Confirmed);

            await ordersService.ChangeOrderTracking(order, trackingResourse.TrackingNumber);

            return(Ok());
        }