diff --git a/src/main/java/org/ntlab/citrusserver/repositories/TodoManager.java b/src/main/java/org/ntlab/citrusserver/repositories/TodoManager.java index a60d082..e0e854c 100644 --- a/src/main/java/org/ntlab/citrusserver/repositories/TodoManager.java +++ b/src/main/java/org/ntlab/citrusserver/repositories/TodoManager.java @@ -25,11 +25,6 @@ */ private final HashMap nextTodoId = new HashMap<>(); -// private final BookManager bookManager; -// -// TodoManger(BookManager bookManager){ -// this.bookManager = bookManager; -// } /** * @@ -181,11 +176,11 @@ nextTodoId.put(accountBook, 0); } - int todoId = nextTodoId.get(accountBook); - Todo newTodo = new Todo(title, false, year, month, day, todoId); - todos.get(accountId).get(bookId).get(year).get(month).get(day).put(todoId, newTodo); - nextTodoId.put(accountBook, todoId + 1); - return todoId; + int newTodoId = nextTodoId.get(accountBook); + Todo newTodo = new Todo(title, false, year, month, day, newTodoId); + todos.get(accountId).get(bookId).get(year).get(month).get(day).put(newTodoId, newTodo); + nextTodoId.put(accountBook, newTodoId + 1); + return newTodoId; } /**