Skip to content

Commit 61521c8

Browse files
committed
fix(s3Service): discord쪽 로깅 및 정상작동확인
1 parent 1bbf757 commit 61521c8

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

linkmind/src/main/java/com/app/toaster/admin/controller/AdminController.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import jakarta.servlet.http.HttpServletResponse;
2424
import jakarta.servlet.http.HttpSession;
2525
import lombok.RequiredArgsConstructor;
26+
import lombok.extern.slf4j.Slf4j;
2627
import org.springframework.stereotype.Controller;
2728
import org.springframework.ui.Model;
2829
import org.springframework.web.bind.annotation.*;
@@ -33,6 +34,7 @@
3334
@Controller
3435
@RequestMapping("/admin")
3536
@RequiredArgsConstructor
37+
@Slf4j
3638
class AdminController {
3739

3840
private final DiscordMessageProvider discordMessageProvider;
@@ -111,6 +113,7 @@ private String executeDiscordQrOperation(String key){
111113
MultipartFile qrImage = qrMfaAuthenticator.generateQrCode(key);
112114
String imageKey = s3Service.uploadImage(qrImage, "admin/");
113115
String qrUrl = s3Service.getURL(imageKey);
116+
log.info("qrUrl이 이렇게 들어갑니다."+qrUrl);
114117
discordMessageProvider.sendAdmin(new NotificationDto(NotificationType.ADMIN,null, qrUrl));
115118
return qrUrl;
116119
}

linkmind/src/main/java/com/app/toaster/external/client/aws/S3Service.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,7 @@ public String getURL(String keyName) {
180180
.build();
181181

182182
URL url = s3Client.utilities().getUrl(request);
183-
System.out.println("The URL for "+keyName +" is "+ url);
184-
return "The URL for "+keyName +" is "+ url;
183+
return ""+url;
185184

186185
} catch (S3Exception e) {
187186
throw new CustomException(Error.UNPROCESSABLE_PRESIGNEDURL_EXCEPTION, Error.UNPROCESSABLE_PRESIGNEDURL_EXCEPTION.getMessage());

0 commit comments

Comments
 (0)