v0.0.24
This commit is contained in:
+6
-3
@@ -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
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user