fix. config -> runtimeConfig 명칭 통일

This commit is contained in:
clkim
2025-11-07 12:55:00 +09:00
parent 2e55cda20e
commit aafc3ae9b9
19 changed files with 590 additions and 384 deletions

View File

@@ -1,4 +1,7 @@
import type { ReqGameMaintenance, ResGameMaintenance } from '#layers/types/GameMaintenanceType'
import type {
ReqGameMaintenance,
ResGameMaintenance,
} from '#layers/types/GameMaintenanceType'
/**
* 게임 점검
@@ -7,7 +10,7 @@ const useGetGameMaintenance = () => {
const inspectionStore = useInspectionStore()
const logPrefix = {
exception: '[Exception] /composables/useGetGameMaintenance',
failure: '[Failure] /composables/useGetGameMaintenance'
failure: '[Failure] /composables/useGetGameMaintenance',
}
const isGameMaintenance = ref(false) // 게임 서버 점검 여부
@@ -20,7 +23,11 @@ const useGetGameMaintenance = () => {
const setGameMaintenanceFalse = () => {
setIsGameMaintenance(false)
inspectionStore.setGameMaintenanceStatus(false)
inspectionStore.setGameMaintenanceData({ ts_start_date: 0, ts_end_date: 0, detail_link: '' })
inspectionStore.setGameMaintenanceData({
ts_start_date: 0,
ts_end_date: 0,
detail_link: '',
})
}
/**
@@ -45,8 +52,8 @@ const useGetGameMaintenance = () => {
if (res != null && res.code === 0) {
// FIXME: 테스트용 데이터 ---------------------------------------------------
/* const config = useRuntimeConfig()
if (['local', 'local-gate8', 'dev'].includes(`${config.public.runType}`)) {
/* const runtimeConfig = useRuntimeConfig()
if (['local', 'local-gate8', 'dev'].includes(`${runtimeConfig.public.runType}`)) {
res.value = {
total_count: 1,
list: [
@@ -65,12 +72,16 @@ const useGetGameMaintenance = () => {
}
} */
// ------------------------------------------------------------------------
if (Number(res.value?.total_count) > 0 && res.value?.list != null && res.value?.list.length > 0) {
if (
Number(res.value?.total_count) > 0 &&
res.value?.list != null &&
res.value?.list.length > 0
) {
setIsGameMaintenance(true) // 서버 1개 이상 점검일 경우 점검 중으로 간주
inspectionStore.setGameMaintenanceData({
ts_start_date: res.value?.list[0].start_at || 0,
ts_end_date: res.value?.list[0].end_at || 0,
detail_link: res.value?.list[0].languages[0].link || ''
detail_link: res.value?.list[0].languages[0].link || '',
})
inspectionStore.setGameMaintenanceStatus(true)
} else {