增加存在子任务判断的controller

master
yang.yongquan 2022-07-05 21:26:15 +08:00
parent 83d95b1227
commit 0417ba1bda
1 changed files with 12 additions and 2 deletions

View File

@ -44,8 +44,8 @@ public class TaskController {
} }
@SneakyThrows @SneakyThrows
@PostMapping("/subtask/exist") @GetMapping("/subtask/exist")
public ResponseMap createTask( public ResponseMap existSubTask(
@RequestHeader("Token") String token, @RequestHeader("Token") String token,
@PathVariable("projectId") Integer projectId, @PathVariable("projectId") Integer projectId,
@RequestParam("taskId") Long taskId @RequestParam("taskId") Long taskId
@ -54,4 +54,14 @@ public class TaskController {
.put("existSubTask" ,taskService.existSubTask(token, projectId, taskId)); .put("existSubTask" ,taskService.existSubTask(token, projectId, taskId));
} }
@SneakyThrows
@DeleteMapping
public ResponseMap deleteTaskAndSubTask(
@RequestHeader("Token") String token,
@PathVariable("projectId") Integer projectId,
@RequestParam("taskId") Long taskId
) {
return ResponseMap.ofSuccess("删除成功");
}
} }