From 0ddebfe20bc04e9c56ca18268ba7dd60d762990e Mon Sep 17 00:00:00 2001 From: Nishchit14 Date: Wed, 27 Dec 2023 13:29:03 +0530 Subject: [PATCH] fix: the auth header issue has been solved --- .../firecamp-rest/src/store/slices/execution.slice.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/playgrounds/firecamp-rest/src/store/slices/execution.slice.ts b/playgrounds/firecamp-rest/src/store/slices/execution.slice.ts index be121ae5..0e1a04ee 100644 --- a/playgrounds/firecamp-rest/src/store/slices/execution.slice.ts +++ b/playgrounds/firecamp-rest/src/store/slices/execution.slice.ts @@ -147,12 +147,16 @@ const createExecutionSlice: TStoreSlice = (set, get) => ({ }, prepareRequestForExecution: () => { - const { request, prepareAuthForExecution, prepareScriptsForExecution } = - get(); + const { + request, + runtime: { authHeaders = [] }, + prepareAuthForExecution, + prepareScriptsForExecution, + } = get(); const auth = prepareAuthForExecution(); const { preScripts, postScripts } = prepareScriptsForExecution(); return { - ...request, + ...{ ...request, headers: [...request.headers, ...authHeaders] }, // merge auth headers to main headers auth, preScripts, postScripts,