任务管理优化
This commit is contained in:
@@ -40,10 +40,8 @@ public class AnnotationTaskController {
|
||||
@Operation(summary = "更新标注任务")
|
||||
@PutMapping("/{id}")
|
||||
public Result<AnnotationTaskResponse> update(
|
||||
@Parameter(description = "任务ID", example = "191000000000000301")
|
||||
@PathVariable Long id,
|
||||
@Valid @RequestBody UpdateAnnotationTaskRequest request
|
||||
) {
|
||||
@Parameter(description = "任务ID", example = "191000000000000301") @PathVariable Long id,
|
||||
@Valid @RequestBody UpdateAnnotationTaskRequest request) {
|
||||
return Result.success(annotationTaskService.updateTask(UserContext.requireUser(), id, request));
|
||||
}
|
||||
|
||||
@@ -56,18 +54,14 @@ public class AnnotationTaskController {
|
||||
@Operation(summary = "查询标注任务详情")
|
||||
@GetMapping("/{id}")
|
||||
public Result<AnnotationTaskResponse> detail(
|
||||
@Parameter(description = "任务ID", example = "191000000000000301")
|
||||
@PathVariable Long id
|
||||
) {
|
||||
@Parameter(description = "任务ID", example = "191000000000000301") @PathVariable Long id) {
|
||||
return Result.success(annotationTaskService.getTask(UserContext.requireUser(), id));
|
||||
}
|
||||
|
||||
@Operation(summary = "删除标注任务")
|
||||
@DeleteMapping("/{id}")
|
||||
public Result<Void> delete(
|
||||
@Parameter(description = "任务ID", example = "191000000000000301")
|
||||
@PathVariable Long id
|
||||
) {
|
||||
@Parameter(description = "任务ID", example = "191000000000000301") @PathVariable Long id) {
|
||||
annotationTaskService.deleteTask(UserContext.requireUser(), id);
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user