diff --git a/api/app/lib/controllers/auth/index.js b/api/app/lib/controllers/auth/index.js index 555caf8..8055d5c 100644 --- a/api/app/lib/controllers/auth/index.js +++ b/api/app/lib/controllers/auth/index.js @@ -93,6 +93,20 @@ async function login (ctx, next) { } } +async function complement (ctx) { + try { + const { models } = ctx.fs.dc; + + ctx.status = 20; + } catch (error) { + ctx.fs.logger.error(`path: ${ctx.path}, error: error`); + ctx.status = 400; + ctx.body = { + message: typeof error == 'string' ? error : undefined + } + } +} + async function logout (ctx) { try { const models = ctx.fs.dc.models; diff --git a/api/app/lib/schedule/alarms_push.js b/api/app/lib/schedule/alarms_push.js index 320042c..c98f033 100644 --- a/api/app/lib/schedule/alarms_push.js +++ b/api/app/lib/schedule/alarms_push.js @@ -683,7 +683,7 @@ module.exports = function (app, opts) { SELECT * FROM alarm_details WHERE AlarmId IN (${dataAlarms.map(da => da.AlarmId).join(',')}, '-1') AND AlarmState = 0 - `) + `).toPromise() } if (proDebug) { console.log(`查得数据告警详情数据 ${dataAlarmDetails.length} 条`);