From 4ac24c8ef822b0ef667dc19fdbf9ba21dc6a37cc Mon Sep 17 00:00:00 2001 From: Kuingsmile <96409857+Kuingsmile@users.noreply.github.com> Date: Sun, 15 Jun 2025 12:05:48 +0800 Subject: [PATCH] :bug: Fix(custom): fix alist delete bugs when used in api ISSUES CLOSED: #337 --- src/renderer/apis/alistplist.ts | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/renderer/apis/alistplist.ts b/src/renderer/apis/alistplist.ts index 7494580b..a3c49bf1 100644 --- a/src/renderer/apis/alistplist.ts +++ b/src/renderer/apis/alistplist.ts @@ -1,7 +1,6 @@ import axios from 'axios' import path from 'path' -import { getConfig, saveConfig } from '@/utils/dataSender' import { deleteFailedLog, deleteLog } from '#/utils/deleteLog' interface IConfigMap { @@ -16,23 +15,12 @@ interface IConfigMap { } const getAListToken = async (url: string, username: string, password: string) => { - const tokenStore = await getConfig('picgo-plugin-buildin-alistplist') - if (tokenStore && tokenStore.refreshedAt && Date.now() - tokenStore.refreshedAt < 3600000 && tokenStore.token) { - return tokenStore.token - } const res = await axios.post(`${url}/api/auth/login`, { username, password }) if (res.data.code === 200 && res.data.message === 'success') { - const token = res.data.data.token - saveConfig({ - 'picgo-plugin-buildin-alistplist': { - token, - refreshedAt: Date.now() - } - }) - return token + return res.data.data.token } }