|
@ -144,7 +144,7 @@ async function notedInspection (ctx) { |
|
|
async function apiError (ctx) { |
|
|
async function apiError (ctx) { |
|
|
try { |
|
|
try { |
|
|
const models = ctx.fs.dc.models; |
|
|
const models = ctx.fs.dc.models; |
|
|
const { projectAppId, alarmContent, router, statusCode = null, screenshot = '', type } = ctx.request.body |
|
|
const { projectAppId, alarmContent, router, statusCode, screenshot = '', type } = ctx.request.body |
|
|
const now = moment().format() |
|
|
const now = moment().format() |
|
|
|
|
|
|
|
|
if (!type) { |
|
|
if (!type) { |
|
@ -155,7 +155,7 @@ async function apiError (ctx) { |
|
|
if (isRestore) { |
|
|
if (isRestore) { |
|
|
const existRes = await models.AppAlarm.findAll({ |
|
|
const existRes = await models.AppAlarm.findAll({ |
|
|
where: { |
|
|
where: { |
|
|
projectAppId, router, |
|
|
projectAppId, router, alarmContent, |
|
|
confirmTime: null, type |
|
|
confirmTime: null, type |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|