Skip to content

Commit

Permalink
Fix: failing create teams request (#636)
Browse files Browse the repository at this point in the history
Fix: failing create teams request
  • Loading branch information
thewahome committed Jul 13, 2020
2 parents 039446d + 1229e67 commit 2ca7df4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/app/views/common/share.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const createShareLink = (sampleQuery: IQuery, authenticated?: boolean): s

if (sampleBody && Object.keys(sampleBody).length > 0) {
const requestBody = hashEncode(JSON.stringify(sampleBody));
shareLink = `&requestBody=${requestBody}`;
shareLink = `${shareLink}&requestBody=${requestBody}`;
}

if (sampleHeaders && sampleHeaders.length > 0) {
Expand All @@ -45,5 +45,5 @@ export const createShareLink = (sampleQuery: IQuery, authenticated?: boolean): s
};

const hashEncode = (requestBody: string): string => {
return btoa(requestBody);
};
return btoa(unescape(encodeURIComponent(requestBody)));
};
2 changes: 1 addition & 1 deletion src/app/views/query-runner/QueryInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class QueryInput extends Component<IQueryInputProps, any> {
background: getStyleFor(selectedVerb),
};

const httpMethodsToDisplay = (mode === Mode.TryIt && !authenticated ) ? [httpMethods[0]] : httpMethods;
const httpMethodsToDisplay = (!authenticated) ? [httpMethods[0]] : httpMethods;

return (
<div className='row'>
Expand Down

0 comments on commit 2ca7df4

Please sign in to comment.