Beispiel #1
0
        public async Task <IActionResult> AttachWorkerToOrder([FromRoute(Name = "id")] int orderId, [FromBody] AttachWorkerInfo workerData)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }

            int clientId = User.GetUserId();
            await ordersService.AttachWorkerToOrderAsync(clientId, orderId, workerData);

            return(Ok());
        }