From e187165b018790d10dde5685ce98ec527b666564 Mon Sep 17 00:00:00 2001 From: gytjd Date: Wed, 20 Nov 2024 14:27:26 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20MemberResponseDto=20=EC=97=90=20?= =?UTF-8?q?=EA=B2=BD=EB=A1=9C=20=EB=B0=98=ED=99=98=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/AIWA/MCPBackend_Member/Dto/AiwaKeyResponseDto.java | 4 ++++ .../AIWA/MCPBackend_Member/Service/member/MemberService.java | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/AIWA/MCPBackend_Member/Dto/AiwaKeyResponseDto.java b/src/main/java/AIWA/MCPBackend_Member/Dto/AiwaKeyResponseDto.java index cd7867b..a463755 100644 --- a/src/main/java/AIWA/MCPBackend_Member/Dto/AiwaKeyResponseDto.java +++ b/src/main/java/AIWA/MCPBackend_Member/Dto/AiwaKeyResponseDto.java @@ -12,6 +12,8 @@ public class AiwaKeyResponseDto { private String accessKey; // Access Key (AWS의 경우만 있을 수 있음) private String secretKey; // Secret Key (AWS의 경우만 있을 수 있음) private String gcpKeyPath; // GCP Key Path (GCP의 경우만 있을 수 있음) + private String awsTfvarsUrl; + private String gcpTfvarsUrl; // Entity -> DTO 변환 메서드 public static AiwaKeyResponseDto toDto(AiwaKey aiwaKey) { @@ -20,6 +22,8 @@ public static AiwaKeyResponseDto toDto(AiwaKey aiwaKey) { dto.setAccessKey(aiwaKey.getAccessKey()); dto.setSecretKey(aiwaKey.getSecretKey()); dto.setGcpKeyPath(aiwaKey.getGcpKeyPath()); + dto.setAwsTfvarsUrl(aiwaKey.getAwsTfvarsUrl()); + dto.setGcpTfvarsUrl(aiwaKey.getGcpTfvarsUrl()); return dto; } } diff --git a/src/main/java/AIWA/MCPBackend_Member/Service/member/MemberService.java b/src/main/java/AIWA/MCPBackend_Member/Service/member/MemberService.java index b53267c..6014512 100644 --- a/src/main/java/AIWA/MCPBackend_Member/Service/member/MemberService.java +++ b/src/main/java/AIWA/MCPBackend_Member/Service/member/MemberService.java @@ -70,7 +70,9 @@ public String addOrUpdateAwsAndGcpKey(String email, String companyName, String a // AWS 및 GCP 키 업데이트 또는 추가 AiwaKey aiwaKey = findOrCreateAiwaKey(member, companyName); - + aiwaKey.setAccessKey(accessKey); + aiwaKey.setSecretKey(secretKey); + // AWS tfvars 파일 생성 및 URL 반환 String awsTfvarsUrl = s3Service.createAwsTfvarsFile(email, accessKey, secretKey); aiwaKey.setAwsTfvarsUrl(awsTfvarsUrl);