-
Notifications
You must be signed in to change notification settings - Fork 101
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
refactor(apply): refactor controller #570
Closed
+256
−64
Closed
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
79a2238
refactor(Term): change response of create api
summerlunaa 7e48dac
refactor(Recruitment): change response of create api
summerlunaa 7ad2dd3
refactor(Mission): change response of create api
summerlunaa 822824a
refactor(Evaluation): change response of create api
summerlunaa c1174ad
refactor(Cheater): change response of create api
summerlunaa 244653e
refactor(Assignment): change response of create api
summerlunaa 4cf81ae
refactor(Mail): change response of create api
summerlunaa 33b545f
refactor: change variable name
summerlunaa 7142a04
refactor: change variable name
summerlunaa 2956f78
feat(Mission): getById api
summerlunaa c5f8d95
feat(Cheater): getById api
summerlunaa 228c989
refactor(Term): add administrator authorization
summerlunaa 4c320b9
refactor(Term): add entity to response of create api
summerlunaa 2605e0c
refactor(Recruitment): add entity to response of create api
summerlunaa e4f4836
refactor(Term): change response type of create api
summerlunaa c509827
refactor(Mission): add entity to response of create api
summerlunaa ee60c5c
refactor(Evaluation): add entity to response of create api
summerlunaa 2ef049d
refactor(Cheater): add entity to response of create api
summerlunaa b2ddcdf
refactor(MailHistory): add entity to response of create api
summerlunaa f171257
refactor(Assignment): add entity to response of create api
summerlunaa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,10 @@ | ||
package apply.domain.cheater | ||
|
||
import org.springframework.data.jpa.repository.JpaRepository | ||
import org.springframework.data.repository.findByIdOrNull | ||
|
||
fun CheaterRepository.getById(id: Long): Cheater = findByIdOrNull(id) | ||
?: throw NoSuchElementException("부정행위자가 존재하지 않습니다. id: $id") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 리소스가 존재하지 않는 예외를 repository 에서 발생시키도록 구현했네요! |
||
|
||
interface CheaterRepository : JpaRepository<Cheater, Long> { | ||
fun existsByEmail(email: String): Boolean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
매개변수로 받은 request 에 저장하면서 생긴
evaluation.id
를 set 해주고 반환하는데 혹시 헷갈릴 수도 있지않을까요?다른 서비스 클래스에서 save 메서드를 고쳤을 때는 새로운 data 객체를 생성했는데 이것만 안그런거 같아서 다시한번 보게 되네요!