Skip to content

Commit

Permalink
feat : add getMyFourCutFiles base codes (#43)
Browse files Browse the repository at this point in the history
* feat : add MY_FOUR_CUT in BrandType enum
  • Loading branch information
gmkim20713 committed Jul 20, 2024
1 parent 7367384 commit 61e9f7c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public enum BrandType {
PHOTOISM(Pattern.compile("https://qr\\.seobuk\\.kr/.*")),
HARU_FILM(Pattern.compile("http://haru\\d+\\.mx\\d+\\.co\\.kr/.*")),
DONT_LOOK_UP(Pattern.compile("https://x\\.dontlxxkup\\.kr/.*")),
MY_FOUR_CUT(Pattern.compile("https://firebasestorage\\.googleapis\\.com:443/v0/b/my4ccu\\.appspot\\.com/.*")),
;

private final Pattern urlPattern;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public Mono<FileDto> getFileFromQrUrl(String qrUrl) {
case PHOTOISM -> createFileDto(brandType, getPhotoismFiles(qrUrl));
case HARU_FILM -> createFileDto(brandType, getHaruFilmFiles(qrUrl));
case DONT_LOOK_UP -> createFileDto(brandType, getDontLookUpFiles(qrUrl));
case MY_FOUR_CUT -> createFileDto(brandType, getMyFourCutFiles(qrUrl));
};
}

Expand Down Expand Up @@ -118,6 +119,10 @@ private Mono<byte[]> getDontLookUpFiles(String qrUrl) {
);
}

private Mono<byte[]> getMyFourCutFiles(String qrUrl) {
return getFileAsByte(qrUrl);
}

private Mono<String> getRedirectUri(String url) {
return externalWebClient
.get()
Expand Down

0 comments on commit 61e9f7c

Please sign in to comment.