Browse Source

策略判重

dev
巴林闲侠 2 years ago
parent
commit
092b886be4
  1. 5
      api/app/lib/controllers/push/config.js

5
api/app/lib/controllers/push/config.js

@ -181,10 +181,11 @@ async function edit (ctx) {
if (pushId) {
repeatOption.where.id = { $ne: pushId }
}
if (repeatOption) {
let repeatRes = await models.findOne(repeatOption)
if (repeatRes) {
throw `已有名称为[${name}]的同名策略`
}
let repeatRes = await models.findOne(repeatOption)
if (pushId) {
await models.AlarmPushConfig.update(storageData, {
where: {

Loading…
Cancel
Save