feat: add sync permissions functionality and UI integration

This commit is contained in:
mlogclub
2026-08-19 15:35:28 +08:00
parent 3b5868689c
commit 954a3fe8d9
9 changed files with 259 additions and 2 deletions
+12
View File
@@ -91,6 +91,12 @@ export type AdminPermission = {
sortNo: number
}
export type PermissionSyncResult = {
created: number
updated: number
rolePermissionsAdded: number
}
export type ConversationTag = {
id: number
name: string
@@ -1240,6 +1246,12 @@ export function fetchPermissions(
)
}
export function syncPermissions() {
return request<PermissionSyncResult>("/api/dashboard/permission/sync", {
method: "POST",
})
}
export function fetchConversations(
query?: Record<string, string | number | undefined>
) {