Skip to content

Commit

Permalink
Run prettier
Browse files Browse the repository at this point in the history
CannonLock committed Nov 19, 2024
1 parent a12a2f3 commit cf287a2
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions web_ui/frontend/app/registry/components/util.tsx
Original file line number Diff line number Diff line change
@@ -128,25 +128,26 @@ export const postGeneralNamespace = async (
export const putGeneralNamespace = async (
data: Namespace
): Promise<Alert | undefined> => {

// If an access_token is in the URL, add it to the request
const url = new URL(`/api/v1.0/registry_ui/namespaces/${data.id}`, window.location.origin);
const accessToken = new URLSearchParams(window.location.search).get('access_token');
const url = new URL(
`/api/v1.0/registry_ui/namespaces/${data.id}`,
window.location.origin
);
const accessToken = new URLSearchParams(window.location.search).get(
'access_token'
);
if (accessToken) {
url.searchParams.append('access_token', accessToken);
}

return await handleRequestAlert(
url.toString(),
{
body: JSON.stringify(data),
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include',
}
);
return await handleRequestAlert(url.toString(), {
body: JSON.stringify(data),
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
credentials: 'include',
});
};

export const submitNamespaceForm = async (

0 comments on commit cf287a2

Please sign in to comment.