first commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
import createAxios from '@/utils/request';
|
||||
import type { IAgent } from '@/domain/iAgents';
|
||||
|
||||
export async function getAgentList() {
|
||||
return createAxios<IAgent[]>({
|
||||
url: '/ai/agent',
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export async function getAgent(id: number) {
|
||||
return createAxios<IAgent>({
|
||||
url: `/ai/agent/${id}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
||||
export async function updateAgent(id: number, data: {enabled: boolean}) {
|
||||
return createAxios({
|
||||
url: `/ai/agent/${id}`,
|
||||
method: 'put',
|
||||
data,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user