mirror of
https://github.com/certd/certd.git
synced 2026-04-16 05:50:50 +08:00
perf: 支持易发云短信
This commit is contained in:
@@ -7,6 +7,7 @@ import { UserSettingsService } from '../../../modules/mine/service/user-settings
|
||||
import { getEmailSettings } from '../../../modules/sys/settings/fix.js';
|
||||
import { http, logger, simpleNanoId } from '@certd/basic';
|
||||
import { CodeService } from '../../../modules/basic/service/code-service.js';
|
||||
import { SmsServiceFactory } from '../../../modules/basic/sms/factory.js';
|
||||
|
||||
/**
|
||||
*/
|
||||
@@ -157,4 +158,9 @@ export class SysSettingsController extends CrudController<SysSettingsService> {
|
||||
await this.codeService.sendSmsCode(body.phoneCode, body.mobile, simpleNanoId());
|
||||
return this.ok({});
|
||||
}
|
||||
|
||||
@Post('/getSmsTypeDefine', { summary: 'sys:settings:view' })
|
||||
async getSmsTypeDefine(@Body('type') type: string) {
|
||||
return this.ok(SmsServiceFactory.getDefine(type));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user