fix. api 수정 반영, getImageHost 수정

This commit is contained in:
clkim
2025-11-04 10:16:24 +09:00
parent 9f1fbbeec1
commit 61b1ab2057
7 changed files with 21 additions and 18 deletions

View File

@@ -28,18 +28,18 @@ export const getImageHost = (
const { imageType = 'game' } = options
const isDevelopment = process.env.NODE_ENV === 'development'
const isCommon = imageType === 'common'
const isTypeGame = imageType === 'game'
// * [TODO] 수정 필요 : 게임별 이미지 로컬에 추가 필요.
if (!isCommon) {
if (isTypeGame) {
return `${staticUrl}${path}`
}
// 개발 환경일 때는 루트 경로 생략
if (isDevelopment) return path
// 공통/게임 여부에 따른 경로 결정
const basePath = isCommon ? assetsUrl : staticUrl
// 게임/공통 여부에 따른 경로 결정
const basePath = isTypeGame ? staticUrl : assetsUrl
return `${basePath}${path}`
}