Exemplo n.º 1
0
        public async Task <ActionResult <SortJob> > GetJob(Guid jobId)
        {
            try
            {
                var response = await Task.Run(() => _sortJobProcessor.GetSortJobById(jobId));

                if (response != null)
                {
                    return(Ok(response));
                }
                else
                {
                    return(StatusCode((int)HttpStatusCode.NotFound, "Invalid Job Id."));
                }
            }
            catch (Exception ex)
            {
                return(StatusCode((int)HttpStatusCode.InternalServerError, ex.Message));
            }
        }
Exemplo n.º 2
0
        public async Task <ActionResult <SortJob> > GetJob(Guid jobId)
        {
            var response = await Task.Run(() => _sortJobProcessor.GetSortJobById(jobId));

            return(Ok(response));
        }