diff --git a/src/main/config/override.ts b/src/main/config/override.ts index bfa29d0..0b9fee0 100644 --- a/src/main/config/override.ts +++ b/src/main/config/override.ts @@ -75,7 +75,8 @@ export async function createOverride(item: Partial): Promise): Promise): Promise { const { useCustomSubStore = false, customSubStoreUrl = '' } = await getAppConfig() const baseUrl = useCustomSubStore ? customSubStoreUrl : `http://127.0.0.1:${subStorePort}` - const res = await axios.get(`${baseUrl}/api/subs`) + const res = await axios.get(`${baseUrl}/api/subs`, { responseType: 'json' }) return res.data.data as ISubStoreSub[] } export async function subStoreCollections(): Promise { const { useCustomSubStore = false, customSubStoreUrl = '' } = await getAppConfig() const baseUrl = useCustomSubStore ? customSubStoreUrl : `http://127.0.0.1:${subStorePort}` - const res = await axios.get(`${baseUrl}/api/collections`) + const res = await axios.get(`${baseUrl}/api/collections`, { responseType: 'json' }) return res.data.data as ISubStoreSub[] } diff --git a/src/main/resolve/autoUpdater.ts b/src/main/resolve/autoUpdater.ts index dc8156b..b1a1cb1 100644 --- a/src/main/resolve/autoUpdater.ts +++ b/src/main/resolve/autoUpdater.ts @@ -20,7 +20,8 @@ export async function checkUpdate(): Promise { protocol: 'http', host: '127.0.0.1', port: mixedPort - } + }, + responseType: 'text' } ) const latest = yaml.parse(res.data, { merge: true }) as IAppVersion diff --git a/src/main/resolve/gistApi.ts b/src/main/resolve/gistApi.ts index 2e30700..0d75186 100644 --- a/src/main/resolve/gistApi.ts +++ b/src/main/resolve/gistApi.ts @@ -20,7 +20,8 @@ async function listGists(token: string): Promise { protocol: 'http', host: '127.0.0.1', port - } + }, + responseType: 'json' }) return res.data as GistInfo[] }