Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: url preview should contain auth params #7509

Merged
merged 3 commits into from
Jun 10, 2024
Merged

Conversation

ihexxa
Copy link
Contributor

@ihexxa ihexxa commented Jun 7, 2024

Changes:

  • fix: url preview should contain auth params

Closes: #7235
Ref: INS-3966

@ihexxa ihexxa self-assigned this Jun 7, 2024
@@ -33,24 +33,38 @@ interface Props {

const defaultPreview = '...';

function getQueryParamsFromAuth(auth: RequestAuthentication | {}): RequestParameter[] {
if (!('type' in auth)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!auth.type) {} seems easier to read

Copy link
Contributor

@jackkav jackkav Jun 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I built a helper for this getAuthObjectOrNull if this equals null that means auth is not set or empty object or doesn't have .type I've made a suggestion for the change but please test it to confirm. These cases are all possible because request groups can have auth objects but existing ones are uninitialised and therefore undefined. In this case it shouldn't show so perhaps you don't need it.

Suggested change
if (!('type' in auth)) {
if (getAuthObjectOrNull(auth) === null) {

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, let me also test this later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this also should preview auth fields coming from folders above

jackkav
jackkav previously approved these changes Jun 7, 2024
@jackkav jackkav enabled auto-merge (squash) June 10, 2024 10:29
@jackkav jackkav merged commit b60b78f into develop Jun 10, 2024
7 checks passed
@jackkav jackkav deleted the fix-preview-auth branch June 10, 2024 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The API Key is not added to the query parameters
3 participants