diff --git a/src/main/java/com/example/letscareer/todo/domain/dto/TodoDTO.java b/src/main/java/com/example/letscareer/todo/domain/dto/TodoDTO.java index 28163b1..e94b471 100644 --- a/src/main/java/com/example/letscareer/todo/domain/dto/TodoDTO.java +++ b/src/main/java/com/example/letscareer/todo/domain/dto/TodoDTO.java @@ -1,6 +1,7 @@ package com.example.letscareer.todo.domain.dto; public record TodoDTO( + Long todoId, String todo, Boolean isChecked ) { diff --git a/src/main/java/com/example/letscareer/todo/service/TodoService.java b/src/main/java/com/example/letscareer/todo/service/TodoService.java index 5e4ce86..366bf4e 100644 --- a/src/main/java/com/example/letscareer/todo/service/TodoService.java +++ b/src/main/java/com/example/letscareer/todo/service/TodoService.java @@ -28,7 +28,7 @@ public TodoResponse getTodos(final Long userId) { List todoList = todoRepository.findAllByUserUserId(userId); List todos = todoList.stream() - .map(t -> new TodoDTO(t.getContent(), t.isChecked())) + .map(t -> new TodoDTO(t.getTodoId(),t.getContent(), t.isChecked())) .collect(Collectors.toList()); return new TodoResponse(todos);