Skip to content

Commit

Permalink
Merge branch 'main' into seminar-deep/#1
Browse files Browse the repository at this point in the history
  • Loading branch information
sansan20535 authored Oct 12, 2024
2 parents 7b13bef + f250626 commit 95b176a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/main/java/org/sopt/week1/DiaryController.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ final List<Diary> getList() {
final void post(final String body) {
if (TextUtils.getLengthOfBody(body) > 30) {
throw new IllegalArgumentException("30자 이하로 적어주세요");

}
diaryService.writeDiary(body);
}
Expand All @@ -42,6 +43,7 @@ final void restore() {
diaryService.restoreDiaryList();
}


enum Status {
READY,
RUNNING,
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/sopt/week1/DiaryRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ private void saveLastId(long id) {
} catch (IOException e) {
System.out.println(e.getMessage());
}

}

}
1 change: 1 addition & 0 deletions src/main/java/org/sopt/week1/DiaryService.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ void updateDiary(final Long id, final String body) {
void restoreDiaryList() {
diaryRepository.restoreAll();
}

}
3 changes: 3 additions & 0 deletions src/main/java/org/sopt/week1/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public void runRepeatedly() throws IOException {
ConsoleIO.printLine("잘못된 값을 입력하였습니다.");
} catch (IllegalArgumentException e) {
ConsoleIO.printLine(e.getMessage());

}

if (isFinished()) {
Expand Down Expand Up @@ -99,6 +100,7 @@ private void run() throws IOException {

ConsoleIO.printLine("삭제된 일기를 복구했습니다.");
}

case "FINISH" -> {
server.finish();
}
Expand Down Expand Up @@ -131,6 +133,7 @@ private String getMenu() {
- DELETE : 일기 제거하기
- PATCH : 일기 수정하기
- RESTORE : 일기 복구하기
""";

}
Expand Down

0 comments on commit 95b176a

Please sign in to comment.