chore: rename service/thunk files to follow get/fetch naming convention
This commit is contained in:
15
redux/thunks/getAnalogInputsHistoryThunk.ts
Normal file
15
redux/thunks/getAnalogInputsHistoryThunk.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// /redux/thunks/getAnalogInputsHistoryThunk.ts
|
||||
import { createAsyncThunk } from "@reduxjs/toolkit";
|
||||
import { fetchAnalogInputsHistoryService } from "@/services/fetchAnalogInputsHistoryService";
|
||||
|
||||
export const getAnalogInputsHistoryThunk = createAsyncThunk(
|
||||
"analogInputsHistory/fetch",
|
||||
async (_, { rejectWithValue }) => {
|
||||
try {
|
||||
const data = await fetchAnalogInputsHistoryService();
|
||||
return data;
|
||||
} catch (error: any) {
|
||||
return rejectWithValue(error.message || "Unbekannter Fehler");
|
||||
}
|
||||
}
|
||||
);
|
||||
Reference in New Issue
Block a user