improve api

This commit is contained in:
2025-03-06 00:07:21 +08:00
parent b77217f724
commit a20ea6c76b
8 changed files with 159 additions and 126 deletions

18
src/api/auth/index.ts Normal file
View File

@@ -0,0 +1,18 @@
import {service} from "@/utils/alova/service.ts";
/**
* 获取分享统计信息
*/
export const checkSecuritySettingApi = () => {
return service.Post('/api/auth/user/check/security/setting', {}, {
cacheFor: {
expire: 60 * 60 * 24 * 7,
mode: "restore",
},
meta: {
ignoreToken: false,
signature: false,
},
name: "check-security-setting",
});
};

View File

@@ -10,6 +10,7 @@ export const shareImageUploadApi = (formData) => {
ignoreToken: false,
signature: false,
},
name: 'upload-share-image',
});
};
/**

View File

@@ -561,3 +561,37 @@ export const addStorageConfigApi = (params: any) => {
name: "add-storage-config",
});
};
/**
* 获取用户上传信息
*/
export const getUserUploadInfoApi = () => {
return service.Post('/api/auth/storage/user/upload/info', {}, {
cacheFor: {
expire: 60 * 60 * 24 * 7,
mode: "restore",
},
meta: {
ignoreToken: false,
signature: false,
},
name: "get-user-upload-info",
hitSource: ["upload-file", "delete-images"],
});
};
/**
* 获取分享统计信息
*/
export const getShareStatisticsInfoApi = () => {
return service.Post('/api/auth/storage/share/recent/info', {}, {
cacheFor: {
expire: 60 * 60 * 24 * 7,
mode: "restore",
},
meta: {
ignoreToken: false,
signature: false,
},
name: "get-share-statistics-info",
hitSource: ["upload-file", "upload-share-image"],
});
};