API版本化:迁移账号摘要与状态入口

This commit is contained in:
Christ committed 2026-08-14 16:44:03 +08:00
1 parent 42cc9ce675
commit 415a3adc5f
10 files changed
+195 -11

No files matched your search

+3 -3
View File
@@ -67,7 +67,7 @@ const accountAvatarURL = (item: AccountSummaryResponse, version: string): string
};
export const getAccountDetails = async (options?: RequestControlOptions): Promise<AccountDetail[]> => {
const data = await get<AccountSummaryResponse[]>('/cookies/details', undefined, options);
const data = await get<AccountSummaryResponse[]>('/api/v1/accounts/details', undefined, options);
const avatarVersion = Date.now().toString();
return data.map(item => ({
id: item.id,
@@ -160,7 +160,7 @@ export interface AccountRuntimeStatus {
}
export const getAccountRuntimeStatuses = async (options?: RequestControlOptions): Promise<Record<string, AccountRuntimeStatus>> => {
return get('/cookies/runtime-status', undefined, options);
return get('/api/v1/accounts/runtime-status', undefined, options);
};
export const generateQRLogin = async (options?: RequestControlOptions): Promise<QRLoginGenerateResponse> => {
@@ -187,7 +187,7 @@ export const completeQRVerification = async (
export const updateAccountStatus = async (id: string, enabled: boolean): Promise<OperationResponse> => {
return put(`/cookies/${id}/status`, { enabled });
return put(`/api/v1/accounts/${id}/status`, { enabled });
};
export const deleteAccount = async (id: string): Promise<OperationResponse> => {