Skip to content

Commit

Permalink
fix:json response error
Browse files Browse the repository at this point in the history
  • Loading branch information
AlmondBreez3 committed Aug 16, 2023
1 parent 540b87f commit d6f929f
Showing 1 changed file with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,26 @@ public class AuthController {
@PostMapping("/api/login/apple")
@Operation(summary = "Apple Login")
@io.swagger.v3.oas.annotations.parameters.RequestBody(description ="{user:testuser,userId:sdjahkfhkjdhsjafhksd,phonenumber:010-1234-1234,email:[email protected]}")
public ResponseEntity<UserResponseDto.TokenInfo> getAppleToken(@RequestBody AppleUserDto appleUserDto) throws Exception{
public ResponseEntity<clutch.clutchserver.global.payload.ApiResponse> getAppleToken(@RequestBody AppleUserDto appleUserDto) throws Exception{
User appleInfo = oAuth2Service.getAppleInfo(appleUserDto);
UserResponseDto.TokenInfo tokenDTO =securityService.appleLogin(appleInfo);
return ResponseEntity.ok(tokenDTO);
clutch.clutchserver.global.payload.ApiResponse apiResponse = clutch.clutchserver.global.payload.ApiResponse.builder()
.check(true)
.information(tokenDTO)
.build();
return ResponseEntity.ok(apiResponse);
}
@PostMapping("/api/login/kakao")
@Operation(summary = "Kakao Login")
@io.swagger.v3.oas.annotations.parameters.RequestBody(description ="{user:testuser,userId:sdjahkfhkjdhsjafhksd,phonenumber:010-1234-1234,email:[email protected]}")
public ResponseEntity<UserResponseDto.TokenInfo> getKToken(@RequestBody KakaoUserDto kakaoUserDto) throws Exception{
public ResponseEntity<clutch.clutchserver.global.payload.ApiResponse> getKToken(@RequestBody KakaoUserDto kakaoUserDto) throws Exception{
User kInfo = oAuth2Service.getKInfo(kakaoUserDto);
UserResponseDto.TokenInfo tokenDTO =securityService.kakaoLogin(kInfo);
return ResponseEntity.ok(tokenDTO);
clutch.clutchserver.global.payload.ApiResponse apiResponse = clutch.clutchserver.global.payload.ApiResponse.builder()
.check(true)
.information(tokenDTO)
.build();
return ResponseEntity.ok(apiResponse);
}

@PostMapping(value = "/api/auth/token/kakao")
Expand Down

0 comments on commit d6f929f

Please sign in to comment.