Skip to content

Commit

Permalink
Merge pull request #79 from LetsCareer-A/refactor/#78
Browse files Browse the repository at this point in the history
#78 [refactor] todo get todoId추가
  • Loading branch information
pkl0912 authored Sep 7, 2024
2 parents 11ddb15 + 3f95e49 commit ef60457
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 ef60457

Please sign in to comment.