0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00

feat(core): remove code redundancy

This commit is contained in:
Darcy Ye 2022-04-29 11:57:56 +08:00
parent c6f2546126
commit d989785658
No known key found for this signature in database
GPG key ID: B46F4C07EDEFC610

View file

@ -4,7 +4,6 @@ import { AliyunSmsConnector } from '@logto/connector-aliyun-sms';
import { FacebookConnector } from '@logto/connector-facebook';
import { GithubConnector } from '@logto/connector-github';
import { GoogleConnector } from '@logto/connector-google';
import { SmsConnector, EmailConnector, SocialConnector } from '@logto/connector-types';
import { WeChatConnector } from '@logto/connector-wechat';
import { WeChatNativeConnector } from '@logto/connector-wechat-native';
@ -15,14 +14,14 @@ import { ConnectorInstance, ConnectorType, IConnector, SocialConnectorInstance }
import { getConnectorConfig } from './utilities';
const allConnectors: IConnector[] = [
new AlipayConnector(getConnectorConfig) as SocialConnector,
new AliyunDmConnector(getConnectorConfig) as EmailConnector,
new AliyunSmsConnector(getConnectorConfig) as SmsConnector,
new FacebookConnector(getConnectorConfig) as SocialConnector,
new GithubConnector(getConnectorConfig) as SocialConnector,
new GoogleConnector(getConnectorConfig) as SocialConnector,
new WeChatConnector(getConnectorConfig) as SocialConnector,
new WeChatNativeConnector(getConnectorConfig) as SocialConnector,
new AlipayConnector(getConnectorConfig),
new AliyunDmConnector(getConnectorConfig),
new AliyunSmsConnector(getConnectorConfig),
new FacebookConnector(getConnectorConfig),
new GithubConnector(getConnectorConfig),
new GoogleConnector(getConnectorConfig),
new WeChatConnector(getConnectorConfig),
new WeChatNativeConnector(getConnectorConfig),
];
export const getConnectorInstances = async (): Promise<ConnectorInstance[]> => {