Files
CPLv4.0/redux/thunks/fetchSystemSettingsThunk.ts
Ismail Ali de9c6a7333 fix: API Endpoint in fetchOpcUaSettingsService für Development korrigiert
- falsches .js im API Pfad entfernt
- Development lädt jetzt korrekt /api/cpl/opcuaAPIHandler
- Production bleibt unverändert
2025-04-15 10:35:52 +02:00

13 lines
464 B
TypeScript

// /redux/thunks/fetchSystemSettingsThunk.ts
import { createAsyncThunk } from "@reduxjs/toolkit";
import { fetchSystemSettings } from "../../services/fetchSystemSettingsService";
import { setSystemSettings } from "../slices/systemSettingsSlice";
export const fetchSystemSettingsThunk = createAsyncThunk(
"systemSettings/fetch",
async (_, { dispatch }) => {
const data = await fetchSystemSettings();
if (data) dispatch(setSystemSettings(data));
}
);