diff --git a/packages/plugins/verification/src/server/Plugin.ts b/packages/plugins/verification/src/server/Plugin.ts index 503a53754..512d456b8 100644 --- a/packages/plugins/verification/src/server/Plugin.ts +++ b/packages/plugins/verification/src/server/Plugin.ts @@ -98,6 +98,12 @@ export default class VerificationPlugin extends Plugin { INIT_ALI_SMS_VERIFY_CODE_SIGN ) { const ProviderRepo = this.db.getRepository('verifications_providers'); + const existed = await ProviderRepo.count({ + filterByTk: DEFAULT_SMS_VERIFY_CODE_PROVIDER, + }); + if (existed) { + return; + } await ProviderRepo.create({ values: { id: DEFAULT_SMS_VERIFY_CODE_PROVIDER,