issue-52 #64
@ -75,6 +75,9 @@ public class ScheduleController {
|
||||
|
||||
if(scheduleFieldInfo instanceof BasicScheduleFieldInfo) {
|
||||
ServiceResult<AbstractSchedule> scheduleResult = taskScheduleService.scheduleBasic(permissionResult.getResult(), (BasicScheduleFieldInfo) scheduleFieldInfo);
|
||||
if(scheduleResult.getExitCode() == ServiceExitCode.INVALID_OPERATION) {
|
||||
return ResponseEntity.status(400).body(new SimpleStatusResponse("failed"));
|
||||
}
|
||||
return ResponseEntity.ok(scheduleResult.getResult().toScheduleInfo());
|
||||
} else if(scheduleFieldInfo instanceof AdvancedScheduleFieldInfo) {
|
||||
ServiceResult<AbstractSchedule> scheduleResult = taskScheduleService.scheduleAdvanced(permissionResult.getResult(), (AdvancedScheduleFieldInfo) scheduleFieldInfo);
|
||||
|
Loading…
Reference in New Issue
Block a user