Skip to content

Commit 0147325

Browse files
author
github-actions
committed
chore: Java 스타일 수정
1 parent a0fd2f9 commit 0147325

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

backend/src/main/java/io/f1/backend/domain/quiz/app/QuizService.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@
1818
import io.f1.backend.domain.quiz.entity.Quiz;
1919
import io.f1.backend.domain.user.dao.UserRepository;
2020
import io.f1.backend.domain.user.entity.User;
21-
2221
import io.micrometer.common.util.StringUtils;
23-
import java.util.NoSuchElementException;
24-
import lombok.RequiredArgsConstructor;
2522

23+
import lombok.RequiredArgsConstructor;
2624
import lombok.extern.slf4j.Slf4j;
25+
2726
import org.springframework.beans.factory.annotation.Value;
2827
import org.springframework.data.domain.Page;
2928
import org.springframework.data.domain.Pageable;
@@ -115,7 +114,7 @@ public void deleteQuiz(Long quizId) {
115114
.orElseThrow(() -> new NoSuchElementException("존재하지 않는 퀴즈입니다."));
116115

117116
// TODO : util 메서드에서 사용자 ID 꺼내쓰는 식으로 수정하기
118-
if(1L != quiz.getCreator().getId()) {
117+
if (1L != quiz.getCreator().getId()) {
119118
throw new RuntimeException("권한이 없습니다.");
120119
}
121120

@@ -161,7 +160,7 @@ private void deleteOldThumbnailFileIfNeeded(String oldFilename) {
161160

162161
try {
163162
boolean deleted = deleteIfExists(filePath);
164-
if( deleted ) {
163+
if (deleted) {
165164
log.info("기존 썸네일 삭제 완료 : {}", filePath);
166165
} else {
167166
log.info("기존 썸네일 존재 X : {}", filePath);
@@ -178,9 +177,9 @@ public QuizListPageResponse getQuizzes(String title, String creator, Pageable pa
178177
Page<Quiz> quizzes;
179178

180179
// 검색어가 있을 때
181-
if(StringUtils.isBlank(title)) {
180+
if (StringUtils.isBlank(title)) {
182181
quizzes = quizRepository.findQuizzesByTitleContaining(title, pageable);
183-
} else if(StringUtils.isBlank(creator)) {
182+
} else if (StringUtils.isBlank(creator)) {
184183
quizzes = quizRepository.findQuizzesByCreator_NicknameContaining(creator, pageable);
185184
} else { // 검색어가 없을 때 혹은 빈 문자열일 때
186185
quizzes = quizRepository.findAll(pageable);

0 commit comments

Comments
 (0)