Skip to content

Commit

Permalink
[BE-REFACTOR] 포켓몬 get api 리펙터링 (#282)
Browse files Browse the repository at this point in the history
* feat: 포켓몬 전체 리스트 뒷모습 이미지 응답 추가

* feat: 포켓몬 진화 응답에 아이디 추가 및 리스트 destruct

* refactor: 진화 응답시 아이템 한글화

* refactor: 메서드 순서 정리 및 try catch 문 재활용

* refactor: empty대신 빈문자열을 반환하도록 변경

* refactor: 타입 이미지 주소 수정

* refactor: 타입 중복, 빈 값 응답 제거

* refactor: 진화 기본폼 응답 못하는 오류 수정

* refactor: 중복 특성 응답 수정

* chore:서브모듈 시점 변경

* fix: typeResponse로 이름 변경

* style: 세미콜론 위치 수정

* refactor: 메서드명 변경

* refactor: 파라미터명 변경
  • Loading branch information
dwax1324 authored Aug 22, 2024
1 parent 250b8f3 commit 336aa75
Show file tree
Hide file tree
Showing 16 changed files with 287 additions and 251 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class S3Service {
private static final String POKEROGUE_TYPE_IMAGE_FOLDER = "pokerogue/type/";
private static final String POKEROGUE_MOVE_CATEGORY_IMAGE_FOLDER = "pokerogue/move-category/";
private static final String POKEROGUE_POKEMON_IMAGE_FOLDER = "pokerogue/pokemon/front/";
private static final String POKEROGUE_POKEMON_BACK_IMAGE_FOLDER = "pokerogue/pokemon/back/";
private static final String SVG_EXTENSION = ".svg";
private static final String PNG_EXTENSION = ".png";

Expand Down Expand Up @@ -72,7 +73,16 @@ public String getPokemonImageFromS3(String pokemonId) {
return s3ImageClient.getFileUrl(key);
}

public String getPokemonBackImageFromS3(String pokemonId) {
String key = makePokemonBackFileName(pokemonId);
return s3ImageClient.getFileUrl(key);
}

private String makePokemonFileName(String pokemonId) {
return POKEROGUE_POKEMON_IMAGE_FOLDER + pokemonId + PNG_EXTENSION;
}

private String makePokemonBackFileName(String pokemonId) {
return POKEROGUE_POKEMON_BACK_IMAGE_FOLDER + pokemonId + PNG_EXTENSION;
}
}
Loading

0 comments on commit 336aa75

Please sign in to comment.