Example #1
0
        public async Task <IActionResult> UpdateScheduleTask(int id, [FromBody] ScheduleTaskDTO scheduleTaskDTO)
        {
            var scheduleTask = scheduleTaskDTO.ToEntity();
            await _scheduleTaskService.UpdateScheduleTask(scheduleTask);

            return(Ok(scheduleTask));
        }
Example #2
0
        public async Task <IActionResult> CreateScheduleTask(ScheduleTaskDTO scheduleTaskDTO)
        {
            var scheduleTask = scheduleTaskDTO.ToEntity();
            await _scheduleTaskService.CreateScheduleTask(scheduleTask);

            return(Ok(scheduleTask));
        }