mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-31 16:43:40 +08:00
init
This commit is contained in:
17
frontend/src/composables/role/useRoleUpsert.ts
Normal file
17
frontend/src/composables/role/useRoleUpsert.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
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,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user