-
Notifications
You must be signed in to change notification settings - Fork 2
refactor : getProblems #398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
e3dd0f7
f21c440
c083218
a641cf4
6d3140f
e6482c3
2028451
74628fc
e2e3222
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package com.gamzabat.algohub.feature.problem.enums; | ||
|
|
||
| public enum ProblemListStatus { | ||
| IN_PROGRESS, | ||
| EXPIRED, | ||
| QUEUED | ||
|
|
||
| } |
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| package com.gamzabat.algohub.feature.problem.exception; | ||
|
|
||
| import org.springframework.http.HttpStatus; | ||
|
|
||
| import lombok.Getter; | ||
|
|
||
| @Getter | ||
| public class InvalidRequestException extends RuntimeException { | ||
| private final HttpStatus status; | ||
| private final String error; | ||
|
|
||
| public InvalidRequestException(HttpStatus status, String error) { | ||
| this.status = status; | ||
| this.error = error; | ||
| } | ||
| } | ||
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ฐ์ธ์ ์ผ๋ก๋
IN_PROGRESS์ํ์ ๋ํด์unsolvedOnly๊ฐ์ด null๋ก ๋ค์ด์ค๋ฉดunsolvedOnly=false๋ผ๋ ๊ฒ๊ณผ ๋์ผํ ์๋ฏธ๋ผ๊ณ ์๊ฐ์ด ๋๋๋ฐ์! ๊ทธ๋์ ์ ๋ถ๋ถ์ ๋ํ ๊ฒ์ฆ์ด ์์ด๋ ๋์ง ์์๊น ์ถ์์ต๋๋ค. ์ด๋ป๊ฒ ์๊ฐํ์๋์?!There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ์ด unsolvedOnly๊ฐ ์ดํ์์ findAllInProgressProblem ์ด ์ฟผ๋ฆฌ๋ถ๋ถ์์ ์ฌ์ฉ๋์ด์์! null๋ก ๋ค์ด์ค๋ฉด NPE๊ฐ ๋ฐ์ํด์ ๊ฒ์ฆ์ ๊ฑธ์ด๋๊ฑฐ๊ธดํด์.
์ฌ์ค ๋งํ๊ฑฐ์ ๋์ํ๊ธฐ๋ ํด์ ์๋น์ค ๋ก์ง๋ถ๋ถ์์ null ์ธ๊ฒฝ์ฐ false๋ก ๋ฐ๊พธ๋๋ก ํ ๊น์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ ๋ ์๋น์ค๊ณ์ธต์์ false๋ก ๋ณ๊ฒฝํด๋ ๋ ๊ฒ ๊ฐ์๋ณด์ ๋๋ค!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๋ต ๊ทธ๋ ๊ฒ ํ ๊ฒ์~!