Feat/api jwt (#1212)

This commit is contained in:
zxhlyh
2023-09-25 12:49:16 +08:00
committed by GitHub
parent c40ee7e629
commit 227f9fb77d
15 changed files with 142 additions and 339 deletions

View File

@@ -15,8 +15,8 @@ import type {
} from '@/models/app'
import type { BackendModel, ProviderMap } from '@/app/components/header/account-setting/model-page/declarations'
export const login: Fetcher<CommonResponse, { url: string; body: Record<string, any> }> = ({ url, body }) => {
return post<CommonResponse>(url, { body })
export const login: Fetcher<CommonResponse & { data: string }, { url: string; body: Record<string, any> }> = ({ url, body }) => {
return post(url, { body }) as Promise<CommonResponse & { data: string }>
}
export const setup: Fetcher<CommonResponse, { body: Record<string, any> }> = ({ body }) => {