fix scheduler api calls
frdel committed
Mar 27, 2026 at 12:47 UTC
68e65ae873691422635fedb9548ac7317732d68e
1 file changed
+2
-2
webui/components/modals/scheduler/scheduler-store.js
+2
-2
@@ -1,10 +1,10 @@
1
import { createStore } from "/js/AlpineStore.js";
2
+import { fetchApi } from "/js/api.js";
3
import { formatDateTime, getUserTimezone } from "/js/time-utils.js";
4
import { store as chatsStore } from "/components/sidebar/chats/chats-store.js";
5
import { store as projectsStore } from "/components/projects/projects-store.js";
6
import { store as notificationsStore } from "/components/notifications/notification-store.js";
7
7
-const API = globalThis.fetchApi || globalThis.fetch;
8
const VIEW_MODE_STORAGE_KEY = "scheduler_view_mode";
9
const NOTIFICATION_DURATION = {
10
success: 3,
@@ -268,7 +268,7 @@ function buildPayloadFromEditingTask(editingTask, { isCreating = false } = {}) {
268
269
async function callSchedulerEndpoint(endpoint, payload = {}, defaultError) {
270
try {
271
- const response = await API(endpoint, {
271
+ const response = await fetchApi(endpoint, {
272
method: "POST",
273
headers: {
274
"Content-Type": "application/json",