-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from tukcomCD2024/Dev-backend
Dev backend
- Loading branch information
Showing
17 changed files
with
135 additions
and
13 deletions.
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
22 changes: 22 additions & 0 deletions
22
.../main/java/com/rollthedice/backend/domain/debate/dto/response/DebateRoomSaveResponse.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,22 @@ | ||
package com.rollthedice.backend.domain.debate.dto.response; | ||
|
||
import com.rollthedice.backend.domain.debate.entity.DebateRoom; | ||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.*; | ||
|
||
@Getter | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
@Schema(description = "토론방 생성 결과") | ||
public class DebateRoomSaveResponse { | ||
@Schema(description = "토론방의 ID입니다.") | ||
private Long id; | ||
|
||
@Schema(description = "토론 주제입니다.") | ||
private String topic; | ||
|
||
@Builder | ||
public DebateRoomSaveResponse(DebateRoom debateRoom) { | ||
this.id = debateRoom.getId(); | ||
this.topic = debateRoom.getTopic(); | ||
} | ||
} |
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
43 changes: 43 additions & 0 deletions
43
backend/core/src/main/java/com/rollthedice/backend/global/oauth2/api/AuthApi.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,43 @@ | ||
package com.rollthedice.backend.global.oauth2.api; | ||
|
||
import com.rollthedice.backend.domain.member.dto.MemberUpdateDto; | ||
import com.rollthedice.backend.global.oauth2.dto.LoginRequest; | ||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.responses.ApiResponse; | ||
import io.swagger.v3.oas.annotations.security.SecurityRequirement; | ||
import jakarta.servlet.http.HttpServletResponse; | ||
import org.springframework.http.HttpStatus; | ||
import org.springframework.http.ResponseEntity; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
|
||
public interface AuthApi { | ||
@Operation( | ||
summary = "소셜 로그인", | ||
description = "소셜 로그인을 합니다. 회원가입이 되어있지 않은 회원일 경우, 회원가입이 진행됩니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"인증"} | ||
) | ||
@ApiResponse( | ||
responseCode = "201", | ||
description = "Created" | ||
) | ||
ResponseEntity<HttpStatus> login( | ||
@RequestBody LoginRequest request, | ||
HttpServletResponse response | ||
); | ||
|
||
@Operation( | ||
summary = "닉네임 입력", | ||
description = "닉네임을 입력합니다. 해당 로직이 진행되어야 회원가입이 완료됩니다.", | ||
security = {@SecurityRequirement(name = "access_token")}, | ||
tags = {"인증"} | ||
) | ||
@ApiResponse( | ||
responseCode = "201", | ||
description = "Created" | ||
) | ||
ResponseEntity<HttpStatus> updateMember( | ||
String email, | ||
@RequestBody MemberUpdateDto memberUpdateDto | ||
); | ||
} |
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
...end/core/src/main/java/com/rollthedice/backend/global/security/jwt/dto/TokenResponse.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.rollthedice.backend.global.security.jwt.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.*; | ||
|
||
@Getter | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
@Schema(description = "AccessToken, RefreshToken 반환 포맷") | ||
public class TokenResponse { | ||
private String accessToken; | ||
private String refreshToken; | ||
} |
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