-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskController.java
More file actions
82 lines (82 loc) · 2.97 KB
/
TaskController.java
File metadata and controls
82 lines (82 loc) · 2.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//package ita.growin.domain.task.controller;
//
//import io.swagger.v3.oas.annotations.Operation;
//import io.swagger.v3.oas.annotations.tags.Tag;
//import ita.growin.domain.task.dto.CreateTaskRequestDto;
//import ita.growin.domain.task.dto.UpdateTaskRequestDto;
//import ita.growin.domain.task.service.TaskService;
//import ita.growin.global.response.APIResponse;
//import org.springframework.data.domain.Pageable;
//import org.springframework.data.domain.Slice;
//import org.springframework.data.web.PageableDefault;
//import org.springframework.lang.Nullable;
//import org.springframework.web.bind.annotation.*;
//
//@RestController
//@RequestMapping("/api/v1/tasks")
//@Tag(name = "할 일", description = "할 일 관련 API")
//public class TaskController {
//
// private final TaskService taskService;
//
// public TaskController(TaskService taskService) {
// this.taskService = taskService;
// }
//
// @PostMapping
// @Operation(summary = "할 일 생성 API")
// public APIResponse<?> createTask(
// @RequestParam("eventId") @Nullable Long eventId,
// @RequestBody CreateTaskRequestDto req) {
// taskService.createTask(eventId, req);
// return APIResponse.success();
// }
//
// @PatchMapping("/{taskId}")
// @Operation(summary = "할 일 수정 API")
// public APIResponse<?> updateTask(
// @PathVariable Long taskId,
// @RequestBody UpdateTaskRequestDto req) {
// taskService.updateTask(taskId, req);
// return APIResponse.success();
// }
//
// @DeleteMapping("/{taskId}")
// @Operation(summary = "할 일 삭제 API")
// public APIResponse<?> deleteTask(
// @RequestParam("eventId") @Nullable Long eventId,
// @PathVariable Long taskId) {
// taskService.deleteTask(eventId, taskId);
// return APIResponse.success();
// }
//
// @GetMapping("/{taskId}")
// @Operation(summary = "할 일 단건 조회")
// public APIResponse<?> getTask(@PathVariable Long taskId) {
// return APIResponse.success(taskService.getTask(taskId));
// }
//
// @GetMapping("/event/{eventId}/tasks")
// @Operation(summary = "일정 내 할 일 조회")
// public APIResponse<Slice<?>> getTasks(
// @PathVariable Long eventId,
// @PageableDefault(size = 20) Pageable pageable) {
// return APIResponse.success(taskService.getTasks(eventId, pageable));
// }
//
// @GetMapping("/tasks/today")
// @Operation(summary = "오늘 할 일 조회")
// public APIResponse<?> getTodayTasks(
// @PageableDefault(size = 20) Pageable pageable
// ) {
// return APIResponse.success(taskService.getTodayTasks(pageable));
// }
//
// @GetMapping("/tasks/someday")
// @Operation(summary = "언젠가 할 일 조회")
// public APIResponse<?> getSomedayTasks(
// @PageableDefault(size = 20) Pageable pageable
// ) {
// return APIResponse.success(taskService.getSomedayTasks(pageable));
// }
//}