mirror of
https://github.com/certd/certd.git
synced 2026-04-24 04:17:25 +08:00
chore:
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { ALL, Body, Controller, Inject, Post, Provide } from '@midwayjs/core';
|
||||
import { Constants } from '@certd/lib-server';
|
||||
import { BaseController, Constants } from '@certd/lib-server';
|
||||
import {
|
||||
AccessRequestHandleReq,
|
||||
ITaskPlugin,
|
||||
@@ -10,7 +10,6 @@ import {
|
||||
PluginRequestHandleReq,
|
||||
TaskInstanceContext,
|
||||
} from '@certd/pipeline';
|
||||
import { BaseController } from '@certd/lib-server';
|
||||
import { AccessService } from '../../modules/pipeline/service/access-service.js';
|
||||
import { EmailService } from '../../modules/basic/service/email-service.js';
|
||||
import { AccessGetter } from '../../modules/pipeline/service/access-getter.js';
|
||||
|
||||
@@ -57,6 +57,10 @@ export class EmailService implements IEmailService {
|
||||
async send(email: EmailSend) {
|
||||
logger.info('sendEmail', email);
|
||||
|
||||
if (!email.receivers || email.receivers.length === 0) {
|
||||
throw new Error('收件人不能为空');
|
||||
}
|
||||
|
||||
const emailConf = await getEmailSettings(this.sysSettingsService, this.settingsService);
|
||||
|
||||
if (!emailConf.host && emailConf.usePlus == null) {
|
||||
|
||||
@@ -30,8 +30,9 @@ export class QywxNotification extends BaseNotification {
|
||||
mentionedList!: string[];
|
||||
|
||||
async send(body: NotificationBody) {
|
||||
console.log('send qywx');
|
||||
|
||||
if (!this.webhook) {
|
||||
throw new Error('webhook地址不能为空');
|
||||
}
|
||||
/**
|
||||
*
|
||||
* "msgtype": "text",
|
||||
|
||||
Reference in New Issue
Block a user