feat: add cancel task api

This commit is contained in:
vran
2022-04-19 23:19:33 +08:00
parent ad4b1d9fe0
commit 302c2b15dc
4 changed files with 22 additions and 2 deletions

View File

@@ -91,7 +91,14 @@ public class ProjectController {
@PostMapping(Routes.GroupProject.LIST_MANUAL_TASKS)
public JsonData<List<ProjectSimpleTaskResponse>> listManualTasks(@PathVariable Integer projectId,
@RequestBody ProjectTaskListCondition condition) {
@RequestBody ProjectTaskListCondition condition) {
return JsonData.ok(projectService.listManualTasks(projectId, condition));
}
@PatchMapping(Routes.GroupProject.CANCEL_MANUAL_TASK)
public JsonData<Void> cancelTask(@PathVariable Integer projectId,
@PathVariable Integer taskId) {
projectService.cancelTask(projectId, taskId);
return JsonData.ok();
}
}

View File

@@ -72,6 +72,8 @@ public interface Routes {
String TEST_CONNECTION = BASE + "/projects/test_connection";
String LIST_MANUAL_TASKS = BASE + "/projects/{projectId}/list_manual_tasks";
String CANCEL_MANUAL_TASK = BASE + "/projects/{projectId}/tasks/{taskId}/cancel";
}
interface Document {