Skip to content

Commit

Permalink
Refac: MemberResponse 에 ProjectId 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
gytjd committed Nov 25, 2024
1 parent 2d48130 commit 228038b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ public class AiwaKeyResponseDto {
private String companyName; // 회사 이름 (AWS, GCP 등)
private String accessKey; // Access Key (AWS의 경우만 있을 수 있음)
private String secretKey; // Secret Key (AWS의 경우만 있을 수 있음)
private String projectId;
private String gcpKeyPath; // GCP Key Path (GCP의 경우만 있을 수 있음)
private String awsTfvarsUrl;
private String gcpTfvarsUrl;
Expand All @@ -21,6 +22,7 @@ public static AiwaKeyResponseDto toDto(AiwaKey aiwaKey) {
dto.setCompanyName(aiwaKey.getCompanyName());
dto.setAccessKey(aiwaKey.getAccessKey());
dto.setSecretKey(aiwaKey.getSecretKey());
dto.setProjectId(aiwaKey.getProjectId());
dto.setGcpKeyPath(aiwaKey.getGcpKeyPath());
dto.setAwsTfvarsUrl(aiwaKey.getAwsTfvarsUrl());
dto.setGcpTfvarsUrl(aiwaKey.getGcpTfvarsUrl());
Expand Down
5 changes: 4 additions & 1 deletion src/main/java/AIWA/MCPBackend_Member/Entity/AiwaKey.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class AiwaKey {

private String accessKey;
private String secretKey;

private String projectId;
private String gcpKeyPath;

private String awsTfvarsUrl;
Expand All @@ -31,10 +33,11 @@ public class AiwaKey {
@JoinColumn(name = "member_id")
private Member member;

public AiwaKey(String companyName, String accessKey, String secretKey, String gcpKeyPath, Member member) {
public AiwaKey(String companyName, String accessKey, String secretKey, String projectId,String gcpKeyPath, Member member) {
this.companyName = companyName;
this.accessKey = accessKey;
this.secretKey = secretKey;
this.projectId = projectId;
this.gcpKeyPath = gcpKeyPath;
this.member = member;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ private AiwaKey findOrCreateAiwaKey(Member member, String companyName) {
.filter(key -> companyName.equalsIgnoreCase(key.getCompanyName()))
.findFirst()
.orElseGet(() -> {
AiwaKey newKey = new AiwaKey(companyName, null, null, null, member);
AiwaKey newKey = new AiwaKey(companyName, null,null,null, null, member);
member.getAiwaKeys().add(newKey);
return newKey;
});
Expand Down

0 comments on commit 228038b

Please sign in to comment.