update permission
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { axios } from "./BaseAPI";
|
||||
import type { Page, PageResult, Permission, PermissionPayload } from "../types";
|
||||
import type { ModuleCode, Page, PageResult, Permission, PermissionPayload } from "../types";
|
||||
|
||||
const BASE_URI = "/user/permission";
|
||||
|
||||
@@ -21,9 +21,17 @@ async function remove(id: string): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
/** 查询当前登录用户在指定模块内可转授的权限。 */
|
||||
async function grantableList(moduleCode: ModuleCode): Promise<Permission[]> {
|
||||
return await axios.post(`${BASE_URI}/grantable/list`, undefined, {
|
||||
params: { moduleCode }
|
||||
});
|
||||
}
|
||||
|
||||
export default {
|
||||
list,
|
||||
create,
|
||||
update,
|
||||
remove
|
||||
remove,
|
||||
grantableList
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user