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:
parent
c6f2546126
commit
d989785658
1 changed files with 8 additions and 9 deletions
|
@ -4,7 +4,6 @@ import { AliyunSmsConnector } from '@logto/connector-aliyun-sms';
|
||||||
import { FacebookConnector } from '@logto/connector-facebook';
|
import { FacebookConnector } from '@logto/connector-facebook';
|
||||||
import { GithubConnector } from '@logto/connector-github';
|
import { GithubConnector } from '@logto/connector-github';
|
||||||
import { GoogleConnector } from '@logto/connector-google';
|
import { GoogleConnector } from '@logto/connector-google';
|
||||||
import { SmsConnector, EmailConnector, SocialConnector } from '@logto/connector-types';
|
|
||||||
import { WeChatConnector } from '@logto/connector-wechat';
|
import { WeChatConnector } from '@logto/connector-wechat';
|
||||||
import { WeChatNativeConnector } from '@logto/connector-wechat-native';
|
import { WeChatNativeConnector } from '@logto/connector-wechat-native';
|
||||||
|
|
||||||
|
@ -15,14 +14,14 @@ import { ConnectorInstance, ConnectorType, IConnector, SocialConnectorInstance }
|
||||||
import { getConnectorConfig } from './utilities';
|
import { getConnectorConfig } from './utilities';
|
||||||
|
|
||||||
const allConnectors: IConnector[] = [
|
const allConnectors: IConnector[] = [
|
||||||
new AlipayConnector(getConnectorConfig) as SocialConnector,
|
new AlipayConnector(getConnectorConfig),
|
||||||
new AliyunDmConnector(getConnectorConfig) as EmailConnector,
|
new AliyunDmConnector(getConnectorConfig),
|
||||||
new AliyunSmsConnector(getConnectorConfig) as SmsConnector,
|
new AliyunSmsConnector(getConnectorConfig),
|
||||||
new FacebookConnector(getConnectorConfig) as SocialConnector,
|
new FacebookConnector(getConnectorConfig),
|
||||||
new GithubConnector(getConnectorConfig) as SocialConnector,
|
new GithubConnector(getConnectorConfig),
|
||||||
new GoogleConnector(getConnectorConfig) as SocialConnector,
|
new GoogleConnector(getConnectorConfig),
|
||||||
new WeChatConnector(getConnectorConfig) as SocialConnector,
|
new WeChatConnector(getConnectorConfig),
|
||||||
new WeChatNativeConnector(getConnectorConfig) as SocialConnector,
|
new WeChatNativeConnector(getConnectorConfig),
|
||||||
];
|
];
|
||||||
|
|
||||||
export const getConnectorInstances = async (): Promise<ConnectorInstance[]> => {
|
export const getConnectorInstances = async (): Promise<ConnectorInstance[]> => {
|
||||||
|
|
Loading…
Reference in a new issue