fix(webui): improve automation management
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type {
|
||||
AutomationsPayload,
|
||||
AutomationUpdatePayload,
|
||||
ChatSummary,
|
||||
CliAppsPayload,
|
||||
FilePreviewPayload,
|
||||
@@ -213,6 +214,26 @@ export async function runAutomationAction(
|
||||
);
|
||||
}
|
||||
|
||||
export async function updateAutomation(
|
||||
token: string,
|
||||
id: string,
|
||||
values: AutomationUpdatePayload,
|
||||
base: string = "",
|
||||
): Promise<AutomationsPayload> {
|
||||
const query = new URLSearchParams();
|
||||
query.set("id", id);
|
||||
return request<AutomationsPayload>(
|
||||
`${base}/api/webui/automations/update?${query}`,
|
||||
token,
|
||||
{
|
||||
headers: {
|
||||
"X-Nanobot-Automation-Values": JSON.stringify(values),
|
||||
},
|
||||
},
|
||||
API_READ_TIMEOUT_MS,
|
||||
);
|
||||
}
|
||||
|
||||
export async function fetchSkills(
|
||||
token: string,
|
||||
base: string = "",
|
||||
|
||||
Reference in New Issue
Block a user