refactor. 개발 모드에서만 console.log 출력하도록 수정

This commit is contained in:
clkim
2026-03-30 13:45:27 +09:00
parent 8f98bdbd3a
commit 5470fef58d
3 changed files with 11 additions and 3 deletions

View File

@@ -36,7 +36,10 @@ export const useGetInspectionDataExternal = () => {
'GET',
apiUrl
)) as ResGetInspectionData
console.log('🚀 ~ getInspectionDataExternal ~ response:', response)
if (import.meta.dev) {
console.log('🚀 ~ getInspectionDataExternal ~ response:', response)
}
// FIXME: 테스트용 데이터 ---------------------------------------------------
/* if (['local', 'local-gate8', 'dev'].includes(`${runtimeConfig.public.runType}`)) {

View File

@@ -84,7 +84,9 @@ export default defineNuxtRouteMiddleware(async (to, _from) => {
}
}
console.log('🚀 ~ pageData.global response:', pageDataResponse)
if (import.meta.dev) {
console.log('🚀 ~ pageData.global response:', pageDataResponse)
}
} catch (error) {
pageDataStore.clearPageData()
console.error(error)

View File

@@ -185,7 +185,10 @@ export default defineEventHandler(async event => {
const gameDataValue = gameDataResponse.value
event.context.gameData = gameDataValue
event.context.googleAnalyticsId = gameDataValue?.ga_code
console.log('🚀 ~ gameData response:', event.context.gameData)
if (import.meta.dev) {
console.log('🚀 ~ gameData response:', event.context.gameData)
}
// -------------------------------------------------------------------------------
// [Inspection Middleware]