public async Task PostJobAsync()

in RobotOrchestrator.Dispatcher/Controllers/JobsController.cs [26:45]


        public async Task<IActionResult> PostJobAsync(Job job)
        {
            try
            {
                await dispatcher.SendJobAsync(job);

                var result = new OkResult();
                return result;
            }
            catch (DeviceNotFoundException)
            {
                var result = new NotFoundObjectResult("Device Not Found");
                return result;
            }
            catch (Exception ex)
            {
                var result = new BadRequestObjectResult(ex.Message);
                return result;
            }
        }