Skip to content
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

[FE] 콜리네 서비스 제공후 QA(#597) #602

Merged
merged 19 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
6a041da
fix: 모집 마감 -> 종료된 방으로 변경
chlwlstlf Oct 14, 2024
22cffc3
fix: 매칭 후 pr 제출 안 해서 실패했을 때 바로 문구 띄우기
chlwlstlf Oct 14, 2024
17b125e
design: 모달 이름에 width 변경
chlwlstlf Oct 14, 2024
84c1aa3
design: 프로필 드롭다운에서 이름 다 보여지게 하기
chlwlstlf Oct 14, 2024
d7dd326
design: 배너 medium일 때 높이 수정
chlwlstlf Oct 14, 2024
7c29869
feat: timeDropdown에서 선택된 시간이 제일 위에 떠있게 하기
chlwlstlf Oct 14, 2024
eadd447
feat: 피드백 모아보기에서 세부 피드백에 scroll 추가
chlwlstlf Oct 14, 2024
9a45c8e
design: 세부 피드백 높이 지정
chlwlstlf Oct 14, 2024
2fa16e5
fix: content 길이 길어졌을 때 ... 로 보이게 하기
chlwlstlf Oct 14, 2024
1bcb990
design: 피드백 모달 엔터처리, line-height 추가
chlwlstlf Oct 14, 2024
97ab74b
feat: 분류 드롭다운으로 선택하게 변경
chlwlstlf Oct 14, 2024
67224c3
feat: 키워드 없을 때 ui 처리
chlwlstlf Oct 14, 2024
6e66324
feat: 방 매칭 실패 시 서버가 준 message 띄우기
chlwlstlf Oct 14, 2024
83c7406
[BE] Room Controller 역할 분리(#595) (#596)
github-actions[bot] Oct 14, 2024
a8f8dea
refactor: ALL 타입 추가
chlwlstlf Oct 15, 2024
0d6ff16
Merge branch 'fix/#597' of https://github.com/woowacourse-teams/2024-…
00kang Oct 15, 2024
c545dd3
feat: 수정된 api에 맞게 message 타입 추가
00kang Oct 15, 2024
19d022c
fix: 방 생성 시 키워드 입력을 안했을 때 렌더링 조건 수정
00kang Oct 15, 2024
7a3bb01
feat: 바뀐 RoomInfo 데이터 형식에 맞게 storybook 수정
00kang Oct 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package corea.matchresult.controller;

import corea.auth.annotation.LoginMember;
import corea.auth.domain.AuthInfo;
import corea.matchresult.dto.MatchResultResponses;
import corea.matchresult.service.MatchResultService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/rooms")
@RequiredArgsConstructor
public class MatchingResultController implements MatchingResultControllerSpecification {

private final MatchResultService matchResultService;

@GetMapping("/{id}/reviewers")
public ResponseEntity<MatchResultResponses> reviewers(@PathVariable long id, @LoginMember AuthInfo authInfo) {
MatchResultResponses response = matchResultService.findReviewers(authInfo.getId(), id);
return ResponseEntity.ok(response);
}

@GetMapping("/{id}/reviewees")
public ResponseEntity<MatchResultResponses> reviewees(@PathVariable long id, @LoginMember AuthInfo authInfo) {
MatchResultResponses response = matchResultService.findReviewees(authInfo.getId(), id);
return ResponseEntity.ok(response);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package corea.matchresult.controller;

import corea.auth.domain.AuthInfo;
import corea.exception.ExceptionType;
import corea.global.annotation.ApiErrorResponses;
import corea.matchresult.dto.MatchResultResponses;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.springframework.http.ResponseEntity;

public interface MatchingResultControllerSpecification {
@Operation(summary = "해당 방에서 나에게 배정된 리뷰어들의 정보를 반환합니다.",
description = "해당 방에서 자신에게 배정된 리뷰어를 확인합니다. <br>" +
"요청 시 `Authorization Header`에 `Bearer JWT token`을 포함시켜야 합니다. " +
"이 토큰을 기반으로 `AuthInfo` 객체가 생성되며 사용자의 정보가 자동으로 주입됩니다. <br>" +
"JWT 토큰에서 추출된 사용자 정보는 피드백 작성에 필요한 인증된 사용자 정보를 제공합니다. " +
"<br><br>**참고:** 이 API를 사용하기 위해서는 유효한 JWT 토큰이 필요하며, " +
"토큰이 없거나 유효하지 않은 경우 인증 오류가 발생합니다.")
@ApiErrorResponses(value = {ExceptionType.MEMBER_NOT_FOUND, ExceptionType.ROOM_NOT_FOUND})
ResponseEntity<MatchResultResponses> reviewers(@Parameter(description = "방 아이디", example = "1")
long id,
AuthInfo authInfo);

@Operation(summary = "해당 방에서 나에게 배정된 리뷰이들의 정보를 반환합니다.",
description = "해당 방에서 자신에게 배정된 리뷰이를 확인합니다. <br>" +
"요청 시 `Authorization Header`에 `Bearer JWT token`을 포함시켜야 합니다. " +
"이 토큰을 기반으로 `AuthInfo` 객체가 생성되며 사용자의 정보가 자동으로 주입됩니다. <br>" +
"JWT 토큰에서 추출된 사용자 정보는 피드백 작성에 필요한 인증된 사용자 정보를 제공합니다. " +
"<br><br>**참고:** 이 API를 사용하기 위해서는 유효한 JWT 토큰이 필요하며, " +
"토큰이 없거나 유효하지 않은 경우 인증 오류가 발생합니다.")
@ApiErrorResponses(value = {ExceptionType.MEMBER_NOT_FOUND, ExceptionType.ROOM_NOT_FOUND})
ResponseEntity<MatchResultResponses> reviewees(@Parameter(description = "방 아이디", example = "1")
long id,
AuthInfo authInfo);
}
40 changes: 0 additions & 40 deletions backend/src/main/java/corea/room/controller/RoomController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import corea.auth.annotation.AccessedMember;
import corea.auth.annotation.LoginMember;
import corea.auth.domain.AuthInfo;
import corea.matchresult.dto.MatchResultResponses;
import corea.matchresult.service.MatchResultService;
import corea.room.domain.RoomStatus;
import corea.room.dto.RoomCreateRequest;
import corea.room.dto.RoomParticipantResponses;
import corea.room.dto.RoomResponse;
Expand All @@ -25,7 +22,6 @@
public class RoomController implements RoomControllerSpecification {

private final RoomService roomService;
private final MatchResultService matchResultService;
private final AutomaticUpdateService automaticUpdateService;
private final AutomaticMatchingService automaticMatchingService;

Expand All @@ -52,48 +48,12 @@ public ResponseEntity<RoomParticipantResponses> participants(@PathVariable long
return ResponseEntity.ok(response);
}

@GetMapping("/{id}/reviewers")
public ResponseEntity<MatchResultResponses> reviewers(@PathVariable long id, @LoginMember AuthInfo authInfo) {
MatchResultResponses response = matchResultService.findReviewers(authInfo.getId(), id);
return ResponseEntity.ok(response);
}

@GetMapping("/{id}/reviewees")
public ResponseEntity<MatchResultResponses> reviewees(@PathVariable long id, @LoginMember AuthInfo authInfo) {
MatchResultResponses response = matchResultService.findReviewees(authInfo.getId(), id);
return ResponseEntity.ok(response);
}

@GetMapping("/participated")
public ResponseEntity<RoomResponses> participatedRooms(@LoginMember AuthInfo authInfo) {
RoomResponses response = roomService.findParticipatedRooms(authInfo.getId());
return ResponseEntity.ok(response);
}

@GetMapping("/opened")
public ResponseEntity<RoomResponses> openedRooms(@AccessedMember AuthInfo authInfo,
@RequestParam(defaultValue = "0") int page,
@RequestParam(value = "classification", defaultValue = "all") String expression) {
RoomResponses response = roomService.findRoomsWithRoomStatus(authInfo.getId(), page, expression, RoomStatus.OPEN);
return ResponseEntity.ok(response);
}

@GetMapping("/progress")
public ResponseEntity<RoomResponses> progressRooms(@AccessedMember AuthInfo authInfo,
@RequestParam(defaultValue = "0") int page,
@RequestParam(value = "classification", defaultValue = "all") String expression) {
RoomResponses response = roomService.findRoomsWithRoomStatus(authInfo.getId(), page, expression, RoomStatus.PROGRESS);
return ResponseEntity.ok(response);
}

@GetMapping("/closed")
public ResponseEntity<RoomResponses> closedRooms(@AccessedMember AuthInfo authInfo,
@RequestParam(defaultValue = "0") int page,
@RequestParam(value = "classification", defaultValue = "all") String expression) {
RoomResponses response = roomService.findRoomsWithRoomStatus(authInfo.getId(), page, expression, RoomStatus.CLOSE);
return ResponseEntity.ok(response);
}

@DeleteMapping("/{id}")
public ResponseEntity<Void> delete(@PathVariable long id, @LoginMember AuthInfo authInfo) {
roomService.delete(id, authInfo.getId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,30 +50,6 @@ ResponseEntity<RoomParticipantResponses> participants(@Parameter(description = "
long id,
AuthInfo authInfo);

@Operation(summary = "해당 방에서 나에게 배정된 리뷰어들의 정보를 반환합니다.",
description = "해당 방에서 자신에게 배정된 리뷰어를 확인합니다. <br>" +
"요청 시 `Authorization Header`에 `Bearer JWT token`을 포함시켜야 합니다. " +
"이 토큰을 기반으로 `AuthInfo` 객체가 생성되며 사용자의 정보가 자동으로 주입됩니다. <br>" +
"JWT 토큰에서 추출된 사용자 정보는 피드백 작성에 필요한 인증된 사용자 정보를 제공합니다. " +
"<br><br>**참고:** 이 API를 사용하기 위해서는 유효한 JWT 토큰이 필요하며, " +
"토큰이 없거나 유효하지 않은 경우 인증 오류가 발생합니다.")
@ApiErrorResponses(value = {ExceptionType.MEMBER_NOT_FOUND, ExceptionType.ROOM_NOT_FOUND})
ResponseEntity<MatchResultResponses> reviewers(@Parameter(description = "방 아이디", example = "1")
long id,
AuthInfo authInfo);

@Operation(summary = "해당 방에서 나에게 배정된 리뷰이들의 정보를 반환합니다.",
description = "해당 방에서 자신에게 배정된 리뷰이를 확인합니다. <br>" +
"요청 시 `Authorization Header`에 `Bearer JWT token`을 포함시켜야 합니다. " +
"이 토큰을 기반으로 `AuthInfo` 객체가 생성되며 사용자의 정보가 자동으로 주입됩니다. <br>" +
"JWT 토큰에서 추출된 사용자 정보는 피드백 작성에 필요한 인증된 사용자 정보를 제공합니다. " +
"<br><br>**참고:** 이 API를 사용하기 위해서는 유효한 JWT 토큰이 필요하며, " +
"토큰이 없거나 유효하지 않은 경우 인증 오류가 발생합니다.")
@ApiErrorResponses(value = {ExceptionType.MEMBER_NOT_FOUND, ExceptionType.ROOM_NOT_FOUND})
ResponseEntity<MatchResultResponses> reviewees(@Parameter(description = "방 아이디", example = "1")
long id,
AuthInfo authInfo);

@Operation(summary = "참여 중인 방 정보를 반환합니다..",
description = "해당 멤버가 참여 중인 방들의 정보를 리뷰 마감일이 임박한 순으로 정렬해 반환합니다. <br>" +
"요청 시 `Authorization Header`에 `Bearer JWT token`을 포함시켜야 합니다. " +
Expand All @@ -83,54 +59,6 @@ ResponseEntity<MatchResultResponses> reviewees(@Parameter(description = "방 아
"토큰이 없거나 유효하지 않은 경우 인증 오류가 발생합니다.")
ResponseEntity<RoomResponses> participatedRooms(AuthInfo authInfo);

@Operation(summary = "현재 모집 중인 방 정보를 반환합니다.",
description = "현재 모집 중인 방들의 정보를 모집 마감일이 임박한 순으로 정렬해 반환합니다. 이미 참여 중인 방들의 정보는 제외됩니다. <br>" +
"요청 시 `Authorization Header`에 `Bearer JWT token`을 포함시켜야 합니다. " +
"이 토큰을 기반으로 `AuthInfo` 객체가 생성되며 사용자의 정보가 자동으로 주입됩니다. <br>" +
"JWT 토큰에서 추출된 사용자 정보는 피드백 작성에 필요한 인증된 사용자 정보를 제공합니다. " +
"<br><br>**참고:** 이 API를 사용하기 위해서는 유효한 JWT 토큰이 필요하며, " +
"토큰이 없거나 유효하지 않은 경우 인증 오류가 발생합니다.")
@ApiErrorResponses(value = ExceptionType.NOT_FOUND_ERROR)
ResponseEntity<RoomResponses> openedRooms(AuthInfo authInfo,

@Parameter(description = "페이지 정보", example = "1")
int page,

@Parameter(description = "방 분야", example = "AN")
String expression);

@Operation(summary = "현재 모집 완료된 방 정보를 반환합니다.",
description = "현재 모집 완료된 방들의 정보를 반환합니다. 이미 참여 중인 방들의 정보는 제외됩니다. <br>" +
"요청 시 `Authorization Header`에 `Bearer JWT token`을 포함시켜야 합니다. " +
"이 토큰을 기반으로 `AuthInfo` 객체가 생성되며 사용자의 정보가 자동으로 주입됩니다. <br>" +
"JWT 토큰에서 추출된 사용자 정보는 피드백 작성에 필요한 인증된 사용자 정보를 제공합니다. " +
"<br><br>**참고:** 이 API를 사용하기 위해서는 유효한 JWT 토큰이 필요하며, " +
"토큰이 없거나 유효하지 않은 경우 인증 오류가 발생합니다.")
@ApiErrorResponses(value = ExceptionType.NOT_FOUND_ERROR)
ResponseEntity<RoomResponses> progressRooms(AuthInfo authInfo,

@Parameter(description = "페이지 정보", example = "1")
int page,

@Parameter(description = "방 분야", example = "AN")
String expression);

@Operation(summary = "현재 종료된 방 정보를 반환합니다.",
description = "현재 모든 진행이 종료된 방들의 정보를 반환합니다. 이미 참여 중인 방들의 정보는 제외됩니다. <br>" +
"요청 시 `Authorization Header`에 `Bearer JWT token`을 포함시켜야 합니다. " +
"이 토큰을 기반으로 `AuthInfo` 객체가 생성되며 사용자의 정보가 자동으로 주입됩니다. <br>" +
"JWT 토큰에서 추출된 사용자 정보는 피드백 작성에 필요한 인증된 사용자 정보를 제공합니다. " +
"<br><br>**참고:** 이 API를 사용하기 위해서는 유효한 JWT 토큰이 필요하며, " +
"토큰이 없거나 유효하지 않은 경우 인증 오류가 발생합니다.")
@ApiErrorResponses(value = ExceptionType.NOT_FOUND_ERROR)
ResponseEntity<RoomResponses> closedRooms(AuthInfo authInfo,

@Parameter(description = "페이지 정보", example = "2")
int page,

@Parameter(description = "방 분야", example = "FE")
String expression);

@Operation(summary = "방을 삭제합니다.",
description = "이미 생성되어 있는 방을 삭제합니다. <br>" +
"요청 시 `Authorization Header`에 `Bearer JWT token`을 포함시켜야 합니다. " +
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package corea.room.controller;

import corea.auth.annotation.AccessedMember;
import corea.auth.domain.AuthInfo;
import corea.room.domain.RoomStatus;
import corea.room.dto.RoomResponses;
import corea.room.service.RoomInquiryService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/rooms")
@RequiredArgsConstructor
public class RoomInquiryController implements RoomInquiryControllerSpecification {

private final RoomInquiryService roomInquiryService;

@GetMapping("/opened")
public ResponseEntity<RoomResponses> openedRooms(@AccessedMember AuthInfo authInfo,
@RequestParam(defaultValue = "0") int page,
@RequestParam(value = "classification", defaultValue = "all") String expression) {
RoomResponses response = roomInquiryService.findRoomsWithRoomStatus(authInfo.getId(), page, expression, RoomStatus.OPEN);
return ResponseEntity.ok(response);
}

@GetMapping("/progress")
public ResponseEntity<RoomResponses> progressRooms(@AccessedMember AuthInfo authInfo,
@RequestParam(defaultValue = "0") int page,
@RequestParam(value = "classification", defaultValue = "all") String expression) {
RoomResponses response = roomInquiryService.findRoomsWithRoomStatus(authInfo.getId(), page, expression, RoomStatus.PROGRESS);
return ResponseEntity.ok(response);
}

@GetMapping("/closed")
public ResponseEntity<RoomResponses> closedRooms(@AccessedMember AuthInfo authInfo,
@RequestParam(defaultValue = "0") int page,
@RequestParam(value = "classification", defaultValue = "all") String expression) {
RoomResponses response = roomInquiryService.findRoomsWithRoomStatus(authInfo.getId(), page, expression, RoomStatus.CLOSE);
return ResponseEntity.ok(response);
}
}
Loading
Loading