-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: 내가 개설한 스터디 조회 #558
Open
kevstevie
wants to merge
1
commit into
BE/develop
Choose a base branch
from
BE/feature/557
base: BE/develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
feat: 내가 개설한 스터디 조회 #558
Changes from all commits
Commits
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ | |
import java.util.List; | ||
import org.springframework.data.domain.Pageable; | ||
import org.springframework.data.domain.Slice; | ||
import org.springframework.data.domain.SliceImpl; | ||
import org.springframework.stereotype.Service; | ||
import org.springframework.transaction.annotation.Transactional; | ||
|
||
|
@@ -315,4 +316,9 @@ public void exit(Member member, Long studyId) { | |
Study study = findStudyById(studyId); | ||
study.exit(member); | ||
} | ||
|
||
public List<StudyListItemResponse> findAllStudiesCreatedByMember(Member member) { | ||
List<Study> studies = studyRepository.findAllByMasterIdAndProcessingStatus(member.getId(), ProcessingStatus.RECRUITING, Role.MASTER); | ||
return toRecruitingStudyResponse(new SliceImpl<>(studies)); | ||
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. 그냥 List를 넘겨주는 거에 비해 이점이 있나요? 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. 사실 슬라이스 내부기능을 전혀 사용하지 않기 때문에 리스트로 해도 상관없긴 합니다 |
||
} | ||
} |
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
30 changes: 30 additions & 0 deletions
30
backend/src/test/java/com/yigongil/backend/acceptance/steps/StudyFindSteps.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,30 @@ | ||
package com.yigongil.backend.acceptance.steps; | ||
|
||
import static io.restassured.RestAssured.given; | ||
|
||
import io.cucumber.java.en.When; | ||
import io.restassured.response.ExtractableResponse; | ||
import io.restassured.response.Response; | ||
|
||
public class StudyFindSteps { | ||
|
||
private final SharedContext sharedContext; | ||
|
||
public StudyFindSteps(SharedContext sharedContext) { | ||
this.sharedContext = sharedContext; | ||
} | ||
|
||
@When("{string}가 개설한 스터디를 조회한다.") | ||
public void 개설한_스터디를_조회한다(String githubId) { | ||
String token = sharedContext.getToken(githubId); | ||
|
||
ExtractableResponse<Response> response = given().log().all() | ||
.header("Authorization", token) | ||
.when() | ||
.get("/studies/created") | ||
.then().log().all() | ||
.extract(); | ||
|
||
sharedContext.setResponse(response); | ||
} | ||
} |
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
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.
이거 개설한 스터디는 모집 중인 것만 보기로 결정된 사안인가요??
사용자가 <개설한 스터디>와 같은 필터링을 선택했을 때, 모집 중인 것만 보여줄 것이라고 예상하기 보다는 개설한 전체 스터디를 보여주길 예상하지 않을까 싶네요.
차라리 전체를 넘겨주되, 정렬하여 모집 중인 것을 상위로 보여주는 게 낫지 않을까요??
UI 측면에서 해결할 수 있다면 OK긴 합니다.