mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
fix scratchpad not being redirected properly (#6854)
This commit is contained in:
parent
a746d5711d
commit
9d0823597d
@ -282,12 +282,6 @@ export interface FeatureList {
|
||||
export const singleOrgLoader: LoaderFunction = async ({ params }) => {
|
||||
const { organizationId } = params as { organizationId: string };
|
||||
|
||||
const organization = organizationsData.organizations.find(o => o.id === organizationId);
|
||||
|
||||
if (!organization) {
|
||||
return redirect('/organization');
|
||||
}
|
||||
|
||||
const fallbackFeatures = {
|
||||
gitSync: { enabled: false, reason: 'Insomnia API unreachable' },
|
||||
orgBasicRbac: { enabled: false, reason: 'Insomnia API unreachable' },
|
||||
@ -299,6 +293,12 @@ export const singleOrgLoader: LoaderFunction = async ({ params }) => {
|
||||
};
|
||||
}
|
||||
|
||||
const organization = organizationsData.organizations.find(o => o.id === organizationId);
|
||||
|
||||
if (!organization) {
|
||||
return redirect('/organization');
|
||||
}
|
||||
|
||||
try {
|
||||
const response = await window.main.insomniaFetch<{ features: FeatureList } | undefined>({
|
||||
method: 'GET',
|
||||
|
Loading…
Reference in New Issue
Block a user