授权应用添加详情,编辑,删除操作

This commit is contained in:
Lrd
2026-06-11 16:54:41 +08:00
parent bec4f6b419
commit 2a37adea0a
8 changed files with 602 additions and 145 deletions
+37
View File
@@ -278,6 +278,43 @@ export async function getOperationLogs(page?: number): Promise<{ total: number;
return api.get(`/admin/operation-logs${q}`);
}
// ── oauthapp List ──────────────────────────────────────
export async function getOauthAppList(page?: number): Promise<{ total: number; items: any[] }> {
const q = page ? `?page=${page}` : '';
return api.get(`/admin/user-oauth-apps/list${q}`);
}
export async function createOauthApp(data: {
app_id: string;
secret: string;
open_type: number;
count?: number;
auth_url?: string;
company?: string;
}): Promise<any> {
return api.post('/admin/user-oauth-apps/create', data);
}
export async function getOauthApp(id: string): Promise<any> {
return api.get(`/admin/user-oauth-apps/read/${id}`);
}
export async function updateOauthApp(id: string, data: {
app_id?: string;
secret?: string;
open_type?: number;
count?: number;
auth_url?: string;
company?: string;
}): Promise<any> {
return api.post(`/admin/user-oauth-apps/update/${id}`, data);
}
export async function deleteOauthApp(id: string): Promise<void> {
await api.get(`/admin/user-oauth-apps/delete/${id}`);
}
// ── Generation Records (Admin) ─────────────────────────────
export async function getAdminGenerationRecords(params?: {