Fix query name not updating

- For queries take the payload as it is.
This commit is contained in:
Akash N 2020-06-23 16:40:26 +05:30 committed by Hetu Nandu
parent b06d4b3ae0
commit 7c9f2185fa

View File

@ -471,13 +471,14 @@ export function* updateActionSaga(
const isApi = actionPayload.payload.data.pluginType === "API";
const { data } = actionPayload.payload;
let action = data;
if (isApi) {
action = transformRestAction(data);
action.name = (yield select(getActions)).find(
(act: any) => act.config.id === action.id,
)?.config.name;
}
action.name = (yield select(getActions)).find(
(act: any) => act.config.id === action.id,
)?.config.name;
const response: GenericApiResponse<RestAction> = yield ActionAPI.updateAPI(
action,
);