Skip to content

Commit 7c084b1

Browse files
authored
Merge pull request #85 from TeamLearningFlow/develop
Develop
2 parents b55bda5 + fd09453 commit 7c084b1

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/main/java/learningFlow/learningFlow_BE/s3/AmazonS3Manager.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,4 @@ public String uploadImageToS3(MultipartFile imageFile) {
7575
throw new GeneralException(ErrorStatus.IMAGE_UPLOAD_FAILED); // 기타 예외 처리
7676
}
7777
}
78-
79-
8078
}

src/main/java/learningFlow/learningFlow_BE/service/lambda/LambdaService.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ public LambdaService() {
2222
}
2323

2424
// 🚀 Lambda 실행 (테스트용 - 기본 JSON 데이터 전달)
25-
public String invokeLambda(String url) {
26-
String payload = String.format("{\"url\":\"%s\"}", url); // Lambda에 URL 전달
25+
public String invokeLambda(String url,int width, int height) {
26+
String payload = String.format("{\"url\":\"%s\", \"width\":%d, \"height\":%d}", url, width, height);
2727

2828
// 🔹 SdkBytes 변환 (AWS SDK v2에서 payload는 byte[]가 아닌 SdkBytes 사용)
2929
SdkBytes payloadBytes = SdkBytes.fromUtf8String(payload);

src/main/java/learningFlow/learningFlow_BE/web/controller/ResourceRestController.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ public ApiResponse<ResourceResponseDTO.ResourceBlogUrlDTO> watchBlogEpisode (
104104
@Parameters({
105105
@Parameter(name = "episode-id", description = "시청할 강의 에피소드 ID")
106106
})
107-
public String getBlogEpisodeContent(@PathVariable("episode-id") Long episodeId) {
107+
public String getBlogEpisodeContent(@PathVariable("episode-id") Long episodeId,
108+
@RequestParam(defaultValue = "982") int width,
109+
@RequestParam(defaultValue = "552") int height) {
108110
/* CompletableFuture<byte[]> blogSource = blogEmbedService.getBlogSource(episodeId);
109111
110112
HttpHeaders headers = new HttpHeaders();
@@ -121,7 +123,7 @@ public String getBlogEpisodeContent(@PathVariable("episode-id") Long episodeId)
121123
}*/
122124

123125
String url = resourceService.getResourceUrl(episodeId);
124-
return lambdaService.invokeLambda(url);
126+
return lambdaService.invokeLambda(url, width, height);
125127
}
126128

127129
@PostMapping("/{episode-id}/save-progress")

0 commit comments

Comments
 (0)