Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions packages/insomnia/src/utils/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import * as models from '../models';
import type { Organization } from '../models/organization';
import { findPersonalOrganization } from '../models/organization';
import type { Project } from '../models/project';
import { scopeToActivity, type Workspace } from '../models/workspace';
import { scopeToActivity } from '../models/workspace';
export const enum AsyncTask {
SyncOrganization,
MigrateProjects,
Expand Down Expand Up @@ -56,14 +56,6 @@ export const getInitialRouteForOrganization = async ({
if (existingWorkspace) {
return `/organization/${match.params.organizationId}/project/${existingProject._id}/workspace/${existingWorkspace._id}/${scopeToActivity(existingWorkspace.scope)}`;
}

const firstWorkspace = await database.getWhere<Workspace>(models.workspace.type, {
parentId: existingProject._id,
});

if (firstWorkspace?._id) {
return `/organization/${match.params.organizationId}/project/${existingProject._id}/workspace/${firstWorkspace._id}/${scopeToActivity(firstWorkspace.scope)}`;
}
}

return `/organization/${match?.params.organizationId}/project/${existingProject._id}`;
Expand Down