fix(plugin-verification): fix duplication of installation (#2097)
This commit is contained in:
parent
1006a66a6f
commit
6254fceb04
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user