From 95777a4a24f286a90f79bdae08d98e91f058c48c Mon Sep 17 00:00:00 2001 From: baeksom <97323941+baeksom@users.noreply.github.com> Date: Tue, 11 Jun 2024 19:31:01 +0900 Subject: [PATCH] =?UTF-8?q?[BUGFIX]:=20=EA=B8=B0=EB=B3=B8=20=ED=94=84?= =?UTF-8?q?=EB=A1=9C=ED=95=84=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95=20=EB=B0=8F?= =?UTF-8?q?=20=ED=86=A0=ED=81=B0=20=EC=8B=9C=EA=B0=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OutDecision/domain/user/service/S3Service.java | 2 +- .../KGUcapstone/OutDecision/global/common/util/JwtUtil.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/KGUcapstone/OutDecision/domain/user/service/S3Service.java b/src/main/java/KGUcapstone/OutDecision/domain/user/service/S3Service.java index cc4b2ae..9f24769 100644 --- a/src/main/java/KGUcapstone/OutDecision/domain/user/service/S3Service.java +++ b/src/main/java/KGUcapstone/OutDecision/domain/user/service/S3Service.java @@ -73,7 +73,7 @@ public void deleteImage(String ImgUrl) { String fileName = ImgUrl.substring(ImgUrl.lastIndexOf(splitStr) + splitStr.length()); // 기본 프로필 이미지가 아닐 때, 삭제 - if (!fileName.equals(defaultImg)) { + if (!ImgUrl.equals(defaultImg)) { amazonS3Client.deleteObject(new DeleteObjectRequest(bucket, fileName)); System.out.println(" 사진 삭제 완료 "); } diff --git a/src/main/java/KGUcapstone/OutDecision/global/common/util/JwtUtil.java b/src/main/java/KGUcapstone/OutDecision/global/common/util/JwtUtil.java index 1eaee15..ab5864f 100644 --- a/src/main/java/KGUcapstone/OutDecision/global/common/util/JwtUtil.java +++ b/src/main/java/KGUcapstone/OutDecision/global/common/util/JwtUtil.java @@ -66,8 +66,8 @@ public String generateRefreshToken(String email, String role) { public String generateAccessToken(String email, String role) { - long tokenPeriod = 1000L * 60L * 60L * 10L; // 1시간 -// long tokenPeriod = 1000L * 10L; + long tokenPeriod = 1000L * 60L * 60L; // 1시간 + Claims claims = Jwts.claims().setSubject(email); claims.put("role", role);