Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pooja-bruno committed Jan 6, 2025
1 parent ee08fca commit 5cf12ae
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const OAuth2AuthorizationCode = ({ collection }) => {
const dispatch = useDispatch();
const { storedTheme } = useTheme();

const oAuth = collection.draft ? get(collection, 'draft.request.auth.oauth', {}) : get(collection, 'root.request.auth.oauth2', {});
const oAuth = collection.draft ? get(collection, 'draft.request.auth.oauth2', {}) : get(collection, 'root.request.auth.oauth2', {});

const handleRun = async () => {
dispatch(sendCollectionOauth2Request(collection.uid));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const OAuth2ClientCredentials = ({ collection }) => {
const dispatch = useDispatch();
const { storedTheme } = useTheme();

const oAuth = collection.draft ? get(collection, 'draft.request.auth.oauth', {}) : get(collection, 'root.request.auth.oauth2', {});
const oAuth = collection.draft ? get(collection, 'draft.request.auth.oauth2', {}) : get(collection, 'root.request.auth.oauth2', {});

const handleRun = async () => {
dispatch(sendCollectionOauth2Request(collection.uid));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const grantTypeComponentMap = (grantType, collection) => {
};

const OAuth2 = ({ collection }) => {
const oAuth = collection.draft ? get(collection, 'draft.request.auth.oauth', {}) : get(collection, 'root.request.auth.oauth2', {});
const oAuth = collection.draft ? get(collection, 'draft.request.auth.oauth2', {}) : get(collection, 'root.request.auth.oauth2', {});

return (
<StyledWrapper className="mt-2 w-full">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const headerAutoCompleteList = StandardHTTPHeaders.map((e) => e.header);
const Headers = ({ collection }) => {
const dispatch = useDispatch();
const { storedTheme } = useTheme();
const headers = collection.draft ? get(collection, 'draft.request.headers') : get(collection, 'root.request.headers', []);
const headers = collection.draft ? get(collection, 'draft.request.headers', []) : get(collection, 'root.request.headers', []);

const addHeader = () => {
dispatch(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import StyledWrapper from './StyledWrapper';

const Script = ({ collection }) => {
const dispatch = useDispatch();
const requestScript = collection.draft ? get(collection, 'draft.request.script.res', '') : get(collection, 'root.request.script.req', '');
const requestScript = collection.draft ? get(collection, 'draft.request.script.req', '') : get(collection, 'root.request.script.req', '');
const responseScript = collection.draft ? get(collection, 'draft.request.script.res', '') : get(collection, 'root.request.script.res', '');

const { displayedTheme } = useTheme();
Expand Down
4 changes: 2 additions & 2 deletions packages/bruno-cli/src/utils/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ const mergeVars = (collection, request, requestTreePath) => {
};

const mergeScripts = (collection, request, requestTreePath, scriptFlow) => {
let collectionPreReqScript = collection.draft ? get(collection, 'draft.request.script.req') : get(collection, 'root.request.script.req', '');
let collectionPostResScript = collection.draft ? get(collection, 'draft.request.script.res') : get(collection, 'root.request.script.res', '');
let collectionPreReqScript = collection.draft ? get(collection, 'draft.request.script.req', '') : get(collection, 'root.request.script.req', '');
let collectionPostResScript = collection.draft ? get(collection, 'draft.request.script.res', '') : get(collection, 'root.request.script.res', '');
let collectionTests = collection.draft ? get(collection, 'draft.request.tests', '') : get(collection, 'root.request.tests', '');

let combinedPreReqScript = [];
Expand Down
4 changes: 2 additions & 2 deletions packages/bruno-electron/src/utils/collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const mergeVars = (collection, request, requestTreePath) => {
}

let resVars = new Map();
let collectionResponseVars = collection.draft ? get(collection, 'draft.request.vars.res') : get(collection, 'root.request.vars.res', []);
let collectionResponseVars = collection.draft ? get(collection, 'draft.request.vars.res', []) : get(collection, 'root.request.vars.res', []);
collectionResponseVars.forEach((_var) => {
if (_var.enabled) {
resVars.set(_var.name, _var.value);
Expand Down Expand Up @@ -118,7 +118,7 @@ const mergeVars = (collection, request, requestTreePath) => {
const mergeScripts = (collection, request, requestTreePath, scriptFlow) => {
let collectionPreReqScript = collection.draft ? get(collection, 'draft.request.script.req', '') : get(collection, 'root.request.script.req', '');
let collectionPostResScript = collection.draft ? get(collection, 'draft.request.script.res', '') : get(collection, 'root.request.script.res', '');
let collectionTests = collection.draft ? get(collection, 'draft.request.tests') : get(collection, 'root.request.tests', '');
let collectionTests = collection.draft ? get(collection, 'draft.request.tests', '') : get(collection, 'root.request.tests', '');

let combinedPreReqScript = [];
let combinedPostResScript = [];
Expand Down

0 comments on commit 5cf12ae

Please sign in to comment.