Skip to content

Commit d6d8962

Browse files
committed
hotfix: registry integration install
1 parent 4176930 commit d6d8962

2 files changed

Lines changed: 2 additions & 20 deletions

File tree

apps/web/src/components/integrations/select-connection-dialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ export function ConfirmMarketplaceInstallDialog({
8686
authorizeOauthUrl: result.redirectUrl,
8787
});
8888
setIntegration(null);
89-
} else {
89+
} else if (!result.stateSchema) {
9090
navigateWorkspace(
9191
`/connection/${integration.provider}:::${integration.name}`,
9292
);

apps/web/src/hooks/use-integration-install-with-modal.tsx

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// deno-lint-ignore-file no-explicit-any
21
import { useState } from "react";
32
import {
43
useCreateAPIKey,
@@ -50,24 +49,7 @@ export function useIntegrationInstallWithModal() {
5049

5150
// If we get a stateSchema, show the modal
5251
if (result.stateSchema) {
53-
let scopes = result.scopes || [];
54-
55-
// If no scopes were returned, try to get them from the registry app
56-
if (!scopes || scopes.length === 0) {
57-
try {
58-
const registryApp = await getRegistryApp.mutateAsync({
59-
name: params.appName,
60-
});
61-
62-
// Check if the registry app has scope information
63-
// Note: This might not exist in the current schema, but we can check
64-
if (registryApp && "scopes" in registryApp) {
65-
scopes = (registryApp as any).scopes || [];
66-
}
67-
} catch (error) {
68-
console.warn("Failed to get registry app info:", error);
69-
}
70-
}
52+
const scopes = result.scopes || [];
7153

7254
setInstallState({
7355
isModalOpen: true,

0 commit comments

Comments
 (0)