mirror of
https://github.com/ccmjga/zhilu-admin
synced 2026-03-25 21:03:43 +08:00
add ai delete
This commit is contained in:
28
frontend/src/composables/ai/useAiAction.ts
Normal file
28
frontend/src/composables/ai/useAiAction.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import client from "../../api/client";
|
||||
|
||||
export const useAiAction = () => {
|
||||
const deleteUserByUsername = async (username: string) => {
|
||||
await client.DELETE("/ai/action/user", {
|
||||
params: {
|
||||
query: {
|
||||
username,
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const deleteDepartmentByName = async (name: string) => {
|
||||
await client.DELETE("/ai/action/department", {
|
||||
params: {
|
||||
query: {
|
||||
name,
|
||||
},
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
return {
|
||||
deleteUserByUsername,
|
||||
deleteDepartmentByName,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user