Skip to content

Commit

Permalink
feat: 명세 매개변수 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
youngsu5582 committed Nov 27, 2024
1 parent 95a0e7b commit 7a2fa11
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
import corea.auth.annotation.AccessedMember;
import corea.auth.annotation.LoginMember;
import corea.auth.domain.AuthInfo;
import corea.room.dto.RoomCreateRequest;
import corea.room.dto.RoomParticipantResponses;
import corea.room.dto.RoomResponse;
import corea.room.dto.RoomUpdateRequest;
import corea.room.dto.*;
import corea.room.service.RoomService;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
Expand All @@ -22,8 +19,8 @@ public class RoomController implements RoomControllerSpecification {
private final RoomService roomService;

@PostMapping
public ResponseEntity<RoomResponse> create(@LoginMember AuthInfo authInfo, @RequestBody RoomCreateRequest request) {
RoomResponse response = roomService.create(authInfo.getId(), request);
public ResponseEntity<RefactorRoomResponse> create(@LoginMember AuthInfo authInfo, @RequestBody RoomRequest request) {
RefactorRoomResponse response = roomService.create(authInfo.getId(), request);

return ResponseEntity.created(URI.create(String.format("/rooms/%d", response.id())))
.body(response);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
import corea.auth.domain.AuthInfo;
import corea.exception.ExceptionType;
import corea.global.annotation.ApiErrorResponses;
import corea.room.dto.RoomCreateRequest;
import corea.room.dto.RoomParticipantResponses;
import corea.room.dto.RoomResponse;
import corea.room.dto.RoomUpdateRequest;
import corea.room.dto.*;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
Expand All @@ -23,7 +20,7 @@ public interface RoomControllerSpecification {
"<br><br>**참고:** 이 API를 사용하기 위해서는 유효한 JWT 토큰이 필요하며, " +
"토큰이 없거나 유효하지 않은 경우 인증 오류가 발생합니다.")
@ApiErrorResponses(value = ExceptionType.MEMBER_NOT_FOUND)
ResponseEntity<RoomResponse> create(AuthInfo authInfo, RoomCreateRequest request);
ResponseEntity<RefactorRoomResponse> create(AuthInfo authInfo, RoomRequest request);

@Operation(summary = "새로운 방을 수정합니다.",
description = "상호 리뷰 인원을 모을 수 있는 방을 수정합니다. <br>" +
Expand Down

0 comments on commit 7a2fa11

Please sign in to comment.