mirror of
https://github.com/jackhh66/ChatGPT_Web_accessToken.git
synced 2026-12-03 20:59:33 +00:00
fix: some error
This commit is contained in:
1 parent
15f3aac88e
commit
40fa028408
3 files changed
+7
-42
No files matched your search
@@ -25,12 +25,6 @@ function http<T = any>(
|
||||
const successHandler = (res: AxiosResponse<Response<T>>) => {
|
||||
const authStore = useAuthStore()
|
||||
|
||||
if (typeof res.data === 'string') {
|
||||
const lastIndex = (res.data as string).lastIndexOf('\n')
|
||||
if (lastIndex !== -1)
|
||||
res.data = JSON.parse((res.data as string).substring(lastIndex))
|
||||
}
|
||||
|
||||
if (res.data.status === 'Success' || typeof res.data === 'string')
|
||||
return res.data
|
||||
|
||||
|
||||
Reference in new issue
Block a user