mirror of
https://github.com/open-webui/computer.git
synced 2026-11-27 15:49:24 -05:00
refac
This commit is contained in:
1 parent
0f1d358bec
commit
48f4c2c015
4 files changed
+195
-10
No files matched your search
@@ -16,6 +16,8 @@ export type AutomationData = {
|
||||
updated_at: number;
|
||||
last_run: AutomationRunData | null;
|
||||
next_runs: number[] | null;
|
||||
has_webhook: boolean;
|
||||
webhook_url: string | null;
|
||||
};
|
||||
|
||||
export type AutomationRunData = {
|
||||
@@ -81,3 +83,11 @@ export async function getAutomationRuns(
|
||||
): Promise<AutomationRunData[]> {
|
||||
return fetchJSON(`/api/automations/${id}/runs?skip=${skip}&limit=${limit}`);
|
||||
}
|
||||
|
||||
export async function generateWebhook(id: string): Promise<AutomationData> {
|
||||
return fetchJSON(`/api/automations/${id}/webhook`, { method: 'POST' });
|
||||
}
|
||||
|
||||
export async function deleteWebhook(id: string): Promise<AutomationData> {
|
||||
return fetchJSON(`/api/automations/${id}/webhook`, { method: 'DELETE' });
|
||||
}
|
||||
Reference in new issue
Block a user