fix: url preview should contain auth params#7509
Merged
Conversation
CurryYangxx
reviewed
Jun 7, 2024
| const defaultPreview = '...'; | ||
|
|
||
| function getQueryParamsFromAuth(auth: RequestAuthentication | {}): RequestParameter[] { | ||
| if (!('type' in auth)) { |
Member
There was a problem hiding this comment.
if (!auth.type) {} seems easier to read
Contributor
There was a problem hiding this comment.
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) { |
Contributor
Author
There was a problem hiding this comment.
Sure, let me also test this later.
Contributor
There was a problem hiding this comment.
this also should preview auth fields coming from folders above
jackkav
previously approved these changes
Jun 7, 2024
jackkav
approved these changes
Jun 10, 2024
016d58b to
02205c0
Compare
stefancruz
pushed a commit
to stefancruz/insomnia
that referenced
this pull request
Jun 30, 2024
* fix: url preview should contain auth params * fix: lint error * fix auth inheritance --------- Co-authored-by: jackkav <jackkav@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes:
Closes: #7235
Ref: INS-3966