🆕 重构全局通知方案
This commit is contained in:
parent
82a89f827a
commit
279cd90f63
@ -1,5 +1,5 @@
|
|||||||
const { readNotifyConfig, writeNotifyConfig, readNotifyList, writeNotifyList } = require('../utils')
|
const { readNotifyConfig, writeNotifyConfig, readNotifyList, writeNotifyList } = require('../utils')
|
||||||
const { sctTest, emailTest } = require('../utils/test-notify')
|
const { sctTest, emailTest } = require('../utils/notify')
|
||||||
// const commonTemp = require('../template/commonTemp')
|
// const commonTemp = require('../template/commonTemp')
|
||||||
|
|
||||||
async function getNotifyConfig({ res }) {
|
async function getNotifyConfig({ res }) {
|
||||||
@ -7,7 +7,6 @@ async function getNotifyConfig({ res }) {
|
|||||||
return res.success({ data })
|
return res.success({ data })
|
||||||
}
|
}
|
||||||
|
|
||||||
// 根据type待编写测试方法,测试通过才保存到库
|
|
||||||
async function updateNotifyConfig({ res, request }) {
|
async function updateNotifyConfig({ res, request }) {
|
||||||
let { body: { noticeConfig } } = request
|
let { body: { noticeConfig } } = request
|
||||||
let { type } = noticeConfig
|
let { type } = noticeConfig
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// :TODO: 重写
|
// :TODO: 重写
|
||||||
const nodemailer = require('nodemailer')
|
const nodemailer = require('nodemailer')
|
||||||
const { readSupportEmailList, readUserEmailList } = require('./storage')
|
const { readNotifyConfig, readNotifyList } = require('./storage')
|
||||||
const commonTemp = require('../template/commonTemp')
|
const commonTemp = require('../template/commonTemp')
|
||||||
|
|
||||||
const emailCode = {
|
const emailCode = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user