Skip to content

Commit

Permalink
Fix typing for Zulip connector (#298)
Browse files Browse the repository at this point in the history
  • Loading branch information
Weves authored Aug 14, 2023
1 parent e97c122 commit a905373
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
14 changes: 8 additions & 6 deletions web/src/app/admin/connectors/zulip/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const MainSection = () => {
data: connectorIndexingStatuses,
isLoading: isConnectorIndexingStatusesLoading,
error: isConnectorIndexingStatusesError,
} = useSWR<ConnectorIndexingStatus<any>[]>(
} = useSWR<ConnectorIndexingStatus<any, any>[]>(
"/api/manage/admin/connector/indexing-status",
fetcher
);
Expand Down Expand Up @@ -53,11 +53,13 @@ const MainSection = () => {
return <div>Failed to load credentials</div>;
}

const zulipConnectorIndexingStatuses: ConnectorIndexingStatus<ZulipConfig>[] =
connectorIndexingStatuses.filter(
(connectorIndexingStatus) =>
connectorIndexingStatus.connector.source === "zulip"
);
const zulipConnectorIndexingStatuses: ConnectorIndexingStatus<
ZulipConfig,
ZulipCredentialJson
>[] = connectorIndexingStatuses.filter(
(connectorIndexingStatus) =>
connectorIndexingStatus.connector.source === "zulip"
);
const zulipCredential = credentialsData.filter(
(credential) => credential.credential_json?.zuliprc_content
)[0];
Expand Down
3 changes: 1 addition & 2 deletions web/src/app/admin/indexing/status/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ const ConnectorTitle = ({ connectorIndexingStatus }: ConnectorTitleProps) => {
typedConnector.connector_specific_config.channels.join(", ")
);
}
}
else if (connector.source === "zulip") {
} else if (connector.source === "zulip") {
const typedConnector = connector as Connector<ZulipConfig>;
additionalMetadata.set(
"Realm",
Expand Down

1 comment on commit a905373

@vercel
Copy link

@vercel vercel bot commented on a905373 Aug 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.