Skip to content

Commit

Permalink
chore: test code
Browse files Browse the repository at this point in the history
  • Loading branch information
imba97 committed Sep 30, 2024
1 parent 9445bea commit 95d48df
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
14 changes: 14 additions & 0 deletions composables/navidrome/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,21 @@ export const axiosInfo = {
baseURL: runtimeConfig.env.NAVIDROME_API_URL
})

axiosInstance.interceptors.response.use((response) => {
console.log('env')
console.log(runtimeConfig.env)
return response
})

return axiosInstance
},

get testEnv() {
const runtimeConfig = useRuntimeConfig()

return {
...runtimeConfig.env
}
}
}

Expand Down
7 changes: 4 additions & 3 deletions server/api/playing/test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
export default defineEventHandler(async () => {
const runtimeConfig = useRuntimeConfig()
import { axiosInfo } from '~/composables/navidrome/shared'

export default defineEventHandler(async () => {
return {
env: runtimeConfig.env
version: '1',
env: axiosInfo.testEnv
}
})

0 comments on commit 95d48df

Please sign in to comment.