Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,22 @@ public ApiResponse<SnsEventResponseDTO.ListDownLoadLinkResponse> downloadList(
);
}

@Operation(
summary = "워크스페이스에 연동된 인스타그램 계정 조회 API [v1.0 (2025-08-20)]",
description = "# [v1.0 (2025-08-20)](https://www.notion.so/API-21e5da7802c581cca23dff937ac3f155?p=2545da7802c5801299c9f47578ba7d75&pm=s)" +
" 워크스페이스에 연동된 인스타그램 계정을 조회하는 API입니다. Path Variable에 workspaceId를 넣어 요청해주세요."
)
@GetMapping("/{workspaceId}/instagram")
public ApiResponse<SnsEventResponseDTO.getInstagramAccountName> getInstagramAccountName(
@PathVariable String workspaceId,
@Parameter(hidden = true) @AuthUser User user,
@Parameter(hidden = true) @AuthWorkspace Workspace workspace
) {
return ApiResponse.onSuccess(
snsEventQueryService.getInstagramAccountName(
user,
workspace
)
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -99,4 +99,12 @@ public static SnsEventResponseDTO.WinnerResponse toWinnerResponse(Winner winner)
.account(winner.getNickname())
.build();
}

public static SnsEventResponseDTO.getInstagramAccountName toGetInstagramAccountName(
String instagramAccountName
) {
return SnsEventResponseDTO.getInstagramAccountName.builder()
.instagramAccountName(instagramAccountName)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,12 @@ public static class WinnerResponse {
public static class ListDownLoadLinkResponse {
private String downloadLink;
}

@Getter
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class getInstagramAccountName {
private String instagramAccountName;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,6 @@ public interface SnsEventQueryService {
SnsEventResponseDTO.GetSnsEventListRequest getSnsEventList(User user, Workspace workspace);

SnsEventResponseDTO.GetSnsEventRequest getSnsEvent(User user, SnsEvent snsEvent);

SnsEventResponseDTO.getInstagramAccountName getInstagramAccountName(User user, Workspace workspace);
}
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,16 @@ public SnsEventResponseDTO.GetSnsEventRequest getSnsEvent(User user, SnsEvent sn
);

}

@Override
public SnsEventResponseDTO.getInstagramAccountName getInstagramAccountName(User user, Workspace workspace) {
if (workspace.getInstagramAccountName() == null) {
return SnsEventConverter.toGetInstagramAccountName(
""
);
}
return SnsEventConverter.toGetInstagramAccountName(
workspace.getInstagramAccountName()
);
}
}