Skip to content

Commit

Permalink
#78 [refactor] todo get todoId추가
Browse files Browse the repository at this point in the history
  • Loading branch information
pkl0912 committed Sep 7, 2024
1 parent 11ddb15 commit 3f95e49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.example.letscareer.todo.domain.dto;

public record TodoDTO(
Long todoId,
String todo,
Boolean isChecked
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public TodoResponse getTodos(final Long userId) {
List<Todo> todoList = todoRepository.findAllByUserUserId(userId);

List<TodoDTO> 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);
Expand Down

0 comments on commit 3f95e49

Please sign in to comment.