-
Notifications
You must be signed in to change notification settings - Fork 5
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
[BE] issue187: 특정 스터디에서 나의 role을 확인하는 API 생성 #193
Merged
Merged
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
43b3b40
test: 특정 스터디에서 나의 role을 확인하는 API 인수 테스트 작성
jaejae-yoo 3c41971
refactor: api 명세 변경
jaejae-yoo ed84cd4
feat: 스터디에서 사용자의 role을 확인하는 기능
jaejae-yoo 588edcf
fix: 충돌 해결
jaejae-yoo 184bd65
feat: 스터디에서 사용자의 역할을 조회하는 rest docs API 생성
jaejae-yoo d5fed86
refactor: 스터디에서 나의 역할을 조회하는 서비스 로직 메서드 분리
jaejae-yoo 2bef2b1
fix: 충돌 해결
jaejae-yoo 220a59c
fix: rest docs 문제 해결
jaejae-yoo 4fd28f8
fix: 충돌 해결
jaejae-yoo dbcc5ad
refactor: MyRole -> MemberRole 클래스명 변경
jaejae-yoo 8a26d57
refactor: 스터디 사용자 역할을 판별하는 로직 스터디 객체로 이동
jaejae-yoo 785d1d7
test: 사용자 역할 조회 사용자 인증 테스트 추가
jaejae-yoo 7b678f4
Merge branch 'develop' into feat/187-check-is-my-study
jaejae-yoo f9e5a04
refactor: rest docs 변경
jaejae-yoo 12bfe15
refactor: rest docs Mock Mvc -> RestAssuerd로 변경
jaejae-yoo 7102615
test: 사용자가 존재하지 않을 때, 스터디가 존재하지 않을 때 예외 추가
jaejae-yoo 2237674
test: study Id가 string일 경우 400 에러 테스트 추가
jaejae-yoo 99b3c86
fix: 충돌 해결
jaejae-yoo 19ed32e
fix: 충돌 해결
jaejae-yoo 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
Large diffs are not rendered by default.
Oops, something went wrong.
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
6 changes: 6 additions & 0 deletions
6
backend/src/main/java/com/woowacourse/moamoa/study/domain/MemberRole.java
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package com.woowacourse.moamoa.study.domain; | ||
|
||
public enum MemberRole { | ||
|
||
MEMBER, NON_MEMBER, OWNER | ||
} |
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
14 changes: 14 additions & 0 deletions
14
backend/src/main/java/com/woowacourse/moamoa/study/service/response/MyRoleResponse.java
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.woowacourse.moamoa.study.service.response; | ||
|
||
import com.woowacourse.moamoa.study.domain.MemberRole; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Getter; | ||
import lombok.NoArgsConstructor; | ||
|
||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
@Getter | ||
public class MyRoleResponse { | ||
|
||
private MemberRole role; | ||
} |
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.
기존에 존재하는
isAlreadyParticipated
메소드를 활용해도 Service 로직에 이상이 없을 것 같아요!(owner 를 먼저 검사하고 있어서)
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.
물론 로직 자체로는 문제가 없지만, 해당 사용자가 참여자인지 확인하는 메서드로 분리하는 게 더 명확하다고 생각해서 나누는 게 좋을 것 같아요! 기존의
isAlreadyParticipated
의 메서드명 때문에 헷갈릴 것 같아서요!