2022-04-12 10:50:01 +00:00
|
|
|
import { createReducer } from "utils/AppsmithUtils";
|
2019-11-28 03:56:44 +00:00
|
|
|
import {
|
2021-08-03 08:06:48 +00:00
|
|
|
ReduxActionErrorTypes,
|
2019-11-28 03:56:44 +00:00
|
|
|
ReduxAction,
|
2022-04-12 10:50:01 +00:00
|
|
|
} from "@appsmith/constants/ReduxActionConstants";
|
2019-11-28 03:56:44 +00:00
|
|
|
|
|
|
|
|
export type JSExecutionRecord = Record<string, string>;
|
|
|
|
|
const initialState: JSExecutionRecord = {};
|
|
|
|
|
const jsExecutionsReducer = createReducer(initialState, {
|
2021-08-03 08:06:48 +00:00
|
|
|
[ReduxActionErrorTypes.SAVE_JS_EXECUTION_RECORD]: (
|
2019-11-28 03:56:44 +00:00
|
|
|
state: JSExecutionRecord,
|
|
|
|
|
action: ReduxAction<JSExecutionRecord>,
|
|
|
|
|
) => {
|
|
|
|
|
return {
|
|
|
|
|
...state,
|
|
|
|
|
...action.payload,
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default jsExecutionsReducer;
|