From 18b39beac6800a3fd92eda2e1490ad478694bc80 Mon Sep 17 00:00:00 2001 From: imba97 Date: Mon, 30 Sep 2024 21:13:55 +0800 Subject: [PATCH] chore: test code --- composables/navidrome/shared.ts | 6 ------ server/api/playing/test.ts | 6 ++---- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/composables/navidrome/shared.ts b/composables/navidrome/shared.ts index 5bca729..5fd2b0d 100644 --- a/composables/navidrome/shared.ts +++ b/composables/navidrome/shared.ts @@ -29,12 +29,6 @@ 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 }, diff --git a/server/api/playing/test.ts b/server/api/playing/test.ts index 675ded5..99a4e59 100644 --- a/server/api/playing/test.ts +++ b/server/api/playing/test.ts @@ -1,8 +1,6 @@ import { axiosInfo } from '~/composables/navidrome/shared' export default defineEventHandler(async () => { - return { - version: '1', - env: axiosInfo.testEnv - } + return await axiosInfo.instance.post('/getNowPlaying.view', null, axiosInfo.commonOptions) + .then(res => _get(res.data, 'subsonic-response.nowPlaying.entry.0', null)) })