Console: fix rest endpoint edit and details route

PR-URL: https://github.com/hasura/graphql-engine-mono/pull/11040
GitOrigin-RevId: 076d36d24418a9d43f2f862977905b5958af98fa
This commit is contained in:
Varun Choudhary 2024-09-23 17:52:22 +05:30 committed by hasura-bot
parent 23e10ae4a6
commit 169722782f

View File

@ -132,7 +132,7 @@ export const RestEndpointList: React.FC<ListComponentProps> = ({
};
const onClickEdit = (link: string) => () => {
browserHistory.push(`/api/rest/edit/${link}`);
browserHistory.push(`/api/rest/edit/${encodeURIComponent(link)}`);
};
const onSearchChange = debounce((e: React.ChangeEvent<HTMLInputElement>) => {
@ -248,7 +248,9 @@ export const RestEndpointList: React.FC<ListComponentProps> = ({
<>
<Link
to={{
pathname: `/api/rest/details/${endpoint.endpoint.name}`,
pathname: `/api/rest/details/${encodeURIComponent(
endpoint.endpoint.name
)}`,
state: {
...endpoint,
currentQuery: findQuery(