This commit is contained in:
Timi
2026-08-01 17:35:48 +08:00
parent 2cf33d1003
commit efea624376
6 changed files with 132 additions and 39 deletions
+6 -3
View File
@@ -1,5 +1,5 @@
import { axios } from "./BaseAPI";
import type { Page, PageResult, Permission, Role, RolePayload, UserRoleAuthorizeReq } from "../types";
import type { ModuleCode, Page, PageResult, Permission, Role, RolePayload, UserRoleAuthorizeReq } from "../types";
const BASE_URI = "/user/role";
@@ -27,9 +27,12 @@ async function remove(id: string): Promise<void> {
});
}
async function authorizedList(userId: string): Promise<Role[]> {
async function authorizedList(userId: string, moduleCode?: ModuleCode): Promise<Role[]> {
return axios.post(`${BASE_URI}/authorized/list`, undefined, {
params: { userId }
params: {
userId,
moduleCode
}
});
}