From 2e4014863f6a3695e8f2162060aca86179fbea22 Mon Sep 17 00:00:00 2001 From: lohxt1 Date: Thu, 20 Mar 2025 17:06:47 +0530 Subject: [PATCH] fix the validations for oauth2 json_to_bru --- packages/bruno-lang/v2/src/jsonToBru.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/bruno-lang/v2/src/jsonToBru.js b/packages/bruno-lang/v2/src/jsonToBru.js index 547fe380f..1a6d0fbfd 100644 --- a/packages/bruno-lang/v2/src/jsonToBru.js +++ b/packages/bruno-lang/v2/src/jsonToBru.js @@ -196,8 +196,8 @@ ${indentString(`token_placement: ${auth?.oauth2?.tokenPlacement || ''}`)}${ }${ auth?.oauth2?.tokenPlacement !== 'header' ? '\n' + indentString(`token_query_key: ${auth?.oauth2?.tokenQueryKey || ''}`) : '' } -${indentString(`auto_fetch_token: ${auth?.oauth2?.autoFetchToken?.toString?.()}`)} -${indentString(`auto_refresh_token: ${auth?.oauth2?.autoRefreshToken?.toString?.()}`)} +${indentString(`auto_fetch_token: ${(auth?.oauth2?.autoFetchToken|| false).toString()}`)} +${indentString(`auto_refresh_token: ${(auth?.oauth2?.autoRefreshToken || false).toString()}`)} } `; @@ -221,8 +221,8 @@ ${indentString(`token_placement: ${auth?.oauth2?.tokenPlacement || ''}`)}${ }${ auth?.oauth2?.tokenPlacement !== 'header' ? '\n' + indentString(`token_query_key: ${auth?.oauth2?.tokenQueryKey || ''}`) : '' } -${indentString(`auto_fetch_token: ${auth?.oauth2?.autoFetchToken?.toString?.()}`)} -${indentString(`auto_refresh_token: ${auth?.oauth2?.autoRefreshToken?.toString?.()}`)} +${indentString(`auto_fetch_token: ${(auth?.oauth2?.autoFetchToken|| false).toString()}`)} +${indentString(`auto_refresh_token: ${(auth?.oauth2?.autoRefreshToken || false).toString()}`)} } `; @@ -242,8 +242,8 @@ ${indentString(`token_placement: ${auth?.oauth2?.tokenPlacement || ''}`)}${ }${ auth?.oauth2?.tokenPlacement !== 'header' ? '\n' + indentString(`token_query_key: ${auth?.oauth2?.tokenQueryKey || ''}`) : '' } -${indentString(`auto_fetch_token: ${auth?.oauth2?.autoFetchToken.toString?.()}`)} -${indentString(`auto_refresh_token: ${auth?.oauth2?.autoRefreshToken.toString?.()}`)} +${indentString(`auto_fetch_token: ${(auth?.oauth2?.autoFetchToken|| false).toString()}`)} +${indentString(`auto_refresh_token: ${(auth?.oauth2?.autoRefreshToken || false).toString()}`)} } `;