feat: fetch database connection tables in Settings/Integrations/Datab… (#4882)
…ase/Connection Closes #4758 --------- Co-authored-by: Thomas Trompette <thomast@twenty.com>
This commit is contained in:
@ -0,0 +1,15 @@
|
||||
import { SettingsIntegration } from '@/settings/integrations/types/SettingsIntegration';
|
||||
import { RemoteServer } from '~/generated-metadata/graphql';
|
||||
|
||||
type GetConnectionDbNameParams = {
|
||||
integration: SettingsIntegration;
|
||||
connection: RemoteServer;
|
||||
};
|
||||
|
||||
export const getConnectionDbName = ({
|
||||
integration,
|
||||
connection,
|
||||
}: GetConnectionDbNameParams) =>
|
||||
integration.from.key === 'postgresql'
|
||||
? connection.foreignDataWrapperOptions?.dbname
|
||||
: '';
|
||||
Reference in New Issue
Block a user