mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-20 09:23:42 +08:00
18 lines
260 B
TypeScript
18 lines
260 B
TypeScript
import client from "../../api/client";
|
|
|
|
export const useRoleUpsert = () => {
|
|
const upsertRole = async (role: {
|
|
id?: number;
|
|
name: string;
|
|
code: string;
|
|
}) => {
|
|
await client.POST("/iam/role", {
|
|
body: role,
|
|
});
|
|
};
|
|
|
|
return {
|
|
upsertRole,
|
|
};
|
|
};
|