'use strict'; async function list (ctx) { try { const models = ctx.fs.dc.models; const { clickHouse } = ctx.app.fs const alarmRes = await clickHouse.dataAlarm.query(` SELECT * FROM alarms `) ctx.status = 200; ctx.body = [] } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: error`); ctx.status = 400; ctx.body = { message: typeof error == 'string' ? error : undefined } } } module.exports = { list };