From 26345907bb72d9986d2775baae73790feadea427 Mon Sep 17 00:00:00 2001 From: Jiwon Date: Sat, 22 Jul 2023 11:18:53 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[feat]=20=EC=88=98=EC=A0=952?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/hooking/hooking/controller/CopyController.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/shop/hooking/hooking/controller/CopyController.java b/src/main/java/shop/hooking/hooking/controller/CopyController.java index 84f7325..72559a5 100644 --- a/src/main/java/shop/hooking/hooking/controller/CopyController.java +++ b/src/main/java/shop/hooking/hooking/controller/CopyController.java @@ -24,9 +24,7 @@ import javax.servlet.http.HttpServletRequest; import java.io.IOException; import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; +import java.util.*; @RestController @RequiredArgsConstructor @@ -46,10 +44,7 @@ public class CopyController { // 전체 카피라이팅 조회 @GetMapping("") public HttpRes> copyList() { - List copyRes = copyService.getCopyList(); - List limitedCopyRes = getLimitedCopyRes(copyRes,30); - return new HttpRes<>(limitedCopyRes); } private List getLimitedCopyRes(List copyResList, int limit){ From 50288142ce166f1c9db74f915250254a1ba41bd6 Mon Sep 17 00:00:00 2001 From: Jiwon Date: Sat, 22 Jul 2023 21:01:50 +0900 Subject: [PATCH 2/2] =?UTF-8?q?[feat]=20=EC=B9=B4=EC=B9=B4=EC=98=A4=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/hooking/hooking/config/OAuth2SuccessHandler.java | 4 ++-- .../java/shop/hooking/hooking/controller/CopyController.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/shop/hooking/hooking/config/OAuth2SuccessHandler.java b/src/main/java/shop/hooking/hooking/config/OAuth2SuccessHandler.java index 40fd448..0925d3a 100644 --- a/src/main/java/shop/hooking/hooking/config/OAuth2SuccessHandler.java +++ b/src/main/java/shop/hooking/hooking/config/OAuth2SuccessHandler.java @@ -46,11 +46,11 @@ public void onAuthenticationSuccess(HttpServletRequest request, HttpServletRespo log.info("OAuth2User = {}", oAuth2User); String targetUrl; log.info("토큰 발행 시작"); - +// "https://hooking-dev.netlify.app/oath-processor/" String token = jwtTokenProvider.createJwtAccessToken(oAuth2User.getAttribute("id").toString(), role); //토큰발행 log.info("{}", token); //배포url, 로컬url -> 커스텀파라미터 - targetUrl = UriComponentsBuilder.fromUriString("https://hooking-dev.netlify.app/oath-processor/") + targetUrl = UriComponentsBuilder.fromUriString("http://localhost:3000/oath-processor") .queryParam("token", token) .queryParam("firstLogin", firstLogin) .build().toUriString(); diff --git a/src/main/java/shop/hooking/hooking/controller/CopyController.java b/src/main/java/shop/hooking/hooking/controller/CopyController.java index fd0ad93..f93938f 100644 --- a/src/main/java/shop/hooking/hooking/controller/CopyController.java +++ b/src/main/java/shop/hooking/hooking/controller/CopyController.java @@ -61,7 +61,7 @@ public HttpRes> copyList() { } private List getLimitedCopyRes(List copyResList, int limit){ -// Collections.shuffle(copyResList); + Collections.shuffle(copyResList); int endIndex = Math.min(limit, copyResList.size()); return copyResList.subList(0,endIndex); }