Skip to content

Commit

Permalink
[fix] Course Image 순서 변경 - #229
Browse files Browse the repository at this point in the history
  • Loading branch information
gardening-y committed Aug 28, 2024
1 parent 3953894 commit e38b7c8
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ public List<Image> saveImages(final List<MultipartFile> images, final Course cou
List<CompletableFuture<Image>> futureImages = images.stream()
.map(img -> CompletableFuture.supplyAsync(() -> {
try {
int count = sequence.getAndIncrement();
String imagePath = s3Service.uploadImage(path, img).get();
Image newImage = Image.create(
course,
cachePath + imagePath,
sequence.getAndIncrement());
System.out.println(sequence);
count);
return newImage;
} catch (IOException | ExecutionException | InterruptedException e) {
throw new BadRequestException(FailureCode.BAD_REQUEST);
Expand Down

0 comments on commit e38b7c8

Please sign in to comment.