This commit is contained in:
Timothy Jaeryang Baek
2026-04-01 04:33:30 -05:00
parent bae5ff938a
commit 53583f8d83
3 changed files with 0 additions and 75 deletions
-27
View File
@@ -49,33 +49,6 @@ export type AutomationResponse = {
next_runs: number[] | null;
};
export const getAutomations = async (token: string) => {
let error = null;
const res = await fetch(`${WEBUI_API_BASE_URL}/automations/`, {
method: 'GET',
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
authorization: `Bearer ${token}`
}
})
.then(async (res) => {
if (!res.ok) throw await res.json();
return res.json();
})
.catch((err) => {
error = err.detail;
console.error(err);
return null;
});
if (error) {
throw error;
}
return res;
};
export const getAutomationItems = async (
token: string,