File tree Expand file tree Collapse file tree
src/main/java/com/ODG/ODG_back Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,16 +19,16 @@ public class VoteController {
1919 private final JwtTokenProvider jwtTokenProvider ;
2020
2121 @ PostMapping ("/vote" )
22- public ResponseEntity <String > vote (@ PathVariable String inviteCode ,
22+ public ResponseEntity <Void > vote (@ PathVariable String inviteCode ,
2323 @ RequestBody VoteRequestDto voteRequestDto ,
2424 @ CookieValue ("access_token" ) String jwtToken ) {
2525 String userId = jwtTokenProvider .getUserId (jwtToken );
2626 voteService .vote (inviteCode , userId , voteRequestDto );
27- return ResponseEntity .ok ().body ( "OK" );
27+ return ResponseEntity .ok ().build ( );
2828 }
2929
3030 @ GetMapping ("/result" )
31- public ResponseEntity <? > getVoteResults (@ PathVariable String inviteCode ) {
31+ public ResponseEntity <List < VoteResultDto > > getVoteResults (@ PathVariable String inviteCode ) {
3232 List <VoteResultDto > voteResults = voteService .getVoteResults (inviteCode );
3333 return ResponseEntity .ok (voteResults );
3434 }
Original file line number Diff line number Diff line change @@ -19,19 +19,20 @@ public OpenAPI openAPI() {
1919 .description ("ODG 프로젝트의 API 명세서입니다." );
2020
2121 String jwtSchemeName = "jwtAuth" ;
22- // API 요청 헤더에 인증 정보 추가
2322 SecurityRequirement securityRequirement = new SecurityRequirement ().addList (jwtSchemeName );
24- // SecuritySchemes 등록
2523 Components components = new Components ()
2624 .addSecuritySchemes (jwtSchemeName , new SecurityScheme ()
2725 .name (jwtSchemeName )
28- .type (SecurityScheme .Type .HTTP ) // HTTP 방식
26+ .type (SecurityScheme .Type .HTTP )
2927 .scheme ("bearer" )
30- .bearerFormat ("JWT" )); // 토큰 형식 지정
28+ .bearerFormat ("JWT" ));
3129
3230 return new OpenAPI ()
3331 .info (info )
3432 .addSecurityItem (securityRequirement )
35- .components (components );
33+ .components (components )
34+ .addServersItem (new io .swagger .v3 .oas .models .servers .Server ()
35+ .url ("https://o-digo.com" )
36+ .description ("Production server" ));
3637 }
3738}
You can’t perform that action at this time.
0 commit comments