Skip to content

Commit

Permalink
refac: Service단 리팩토링에 따른 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeongmin39 committed Jan 3, 2025
1 parent 2a59792 commit 2fc0bcc
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,16 @@
import com.spot.spotserver.api.auth.dto.request.TokenRequest;
import com.spot.spotserver.api.auth.dto.response.TokenResponse;
import com.spot.spotserver.api.auth.service.AuthService;
import com.spot.spotserver.api.user.service.UserService;
import com.spot.spotserver.common.payload.ApiResponse;
import com.spot.spotserver.common.payload.SuccessCode;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;

@RestController
@RequiredArgsConstructor
public class AuthController {

private final AuthService authService;
private final UserService userService;

@PostMapping("/api/login/kakao")
public ApiResponse<TokenResponse> login(@RequestParam final String accessToken) {
Expand All @@ -34,7 +29,7 @@ public ApiResponse<TokenResponse> login(@RequestParam final String accessToken)
@PostMapping("/api/refresh")
public ApiResponse<TokenResponse> reissueToken(@RequestBody TokenRequest request) {

TokenResponse result = userService.reissueToken(request.refreshToken());
TokenResponse result = authService.reissueToken(request.refreshToken());
return ApiResponse.success(SuccessCode.REISSUE_TOKEN_SUCCESS, result);
}
}

0 comments on commit 2fc0bcc

Please sign in to comment.