|
@ -9,7 +9,7 @@ async function postDataContinuity (ctx) { |
|
|
try { |
|
|
try { |
|
|
const { utils: { sendAppearToWeb }, clickHouse } = ctx.app.fs |
|
|
const { utils: { sendAppearToWeb }, clickHouse } = ctx.app.fs |
|
|
const models = ctx.fs.dc.models; |
|
|
const models = ctx.fs.dc.models; |
|
|
const { type, file, } = ctx.request.body |
|
|
const { type, file, fileUrl } = ctx.request.body |
|
|
const now = moment().format() |
|
|
const now = moment().format() |
|
|
|
|
|
|
|
|
if (!type) { |
|
|
if (!type) { |
|
@ -24,7 +24,7 @@ async function postDataContinuity (ctx) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
await models.AlarmDataContinuity.create({ |
|
|
await models.AlarmDataContinuity.create({ |
|
|
type, file, createTime: now |
|
|
type, file, createTime: now, fileUrl |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
ctx.status = 204; |
|
|
ctx.status = 204; |
|
@ -183,7 +183,7 @@ async function dataContinuityList (ctx) { |
|
|
let findOption = { |
|
|
let findOption = { |
|
|
order: [['createTime', 'desc']], |
|
|
order: [['createTime', 'desc']], |
|
|
where: {}, |
|
|
where: {}, |
|
|
attributes: ['id', 'type', 'createTime'], |
|
|
attributes: ['id', 'type', 'createTime', 'fileUrl'], |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (limit) { |
|
|
if (limit) { |
|
|