Skip to content

Commit b748d02

Browse files
committed
refactor: Repository 메서드명 수정
1 parent b58855b commit b748d02

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

todolist/src/main/java/study/todolist/repository/MemoryDBRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public interface MemoryDBRepository<T> {
99

1010
Optional<T> findById(Long id);
1111

12-
void deleteById(Long id);
12+
void delete(Long id);
1313

1414
List<T> findAll();
1515
}

todolist/src/main/java/study/todolist/repository/TodoRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public Optional<TodoList> findById(Long id) {
3030
}
3131

3232
@Override
33-
public void deleteById(Long id) {
33+
public void delete(Long id) {
3434

3535
DB.removeIf(todo -> todo.getId().equals(id));
3636
}

todolist/src/main/java/study/todolist/service/TodoService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ public Long updateTitle(Long id, String title){
5757

5858
public void delete(Long id){
5959

60-
todoRepository.deleteById(id);
60+
todoRepository.delete(id);
6161
}
6262
}

0 commit comments

Comments
 (0)