授权应用添加详情,编辑,删除操作
This commit is contained in:
@@ -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?: {
|
||||
|
||||
Reference in New Issue
Block a user