Пример #1
0
        public async Task <ActionResult <TaskDto> > AddTaskToAnyQueue([FromBody] TaskDto task)
        {
            try
            {
                var now = DateTime.Parse(HttpContext.Request.Query["now"].ToString());
                task = await _repository.AddTaskToAnyQueue(task, now);

                return(Ok(task));
            }
            catch (Exception ex)
            {
                return(StatusCode(500, ex));
            }
        }