Skip to content

Commit

Permalink
fix: fix getDontLookUpFiles logic errors (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
gmkim20713 committed Jul 13, 2024
1 parent 48adc1d commit 8b309a6
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private Mono<byte[]> getHaruFilmFiles(String qrUrl) {
}

private Mono<byte[]> getDontLookUpFiles(String qrUrl) {
String imageName = extractValueFromUrl(qrUrl, ".kr/");
String imageName = extractValueFromUrl(qrUrl, ".kr/image/");

String baseUrl = "https://x.dontlxxkup.kr/uploads/";
String imageUrl = baseUrl + imageName;
Expand All @@ -107,7 +107,10 @@ private Mono<byte[]> getDontLookUpFiles(String qrUrl) {
} else {
return getFileAsByte(imageUrl);
}
});
})
.onErrorResume(
RedirectUriNotFoundException.class, e -> getFileAsByte(imageUrl)
);
}

private Mono<String> getRedirectUri(String url) {
Expand Down

0 comments on commit 8b309a6

Please sign in to comment.