|
@ -231,6 +231,7 @@ async function get (ctx) { |
|
|
const { models } = ctx.fs.dc; |
|
|
const { models } = ctx.fs.dc; |
|
|
const { userId } = ctx.fs.api |
|
|
const { userId } = ctx.fs.api |
|
|
const { mid } = ctx.params |
|
|
const { mid } = ctx.params |
|
|
|
|
|
const { check } = ctx.query |
|
|
// 查当前镜像的全部信息
|
|
|
// 查当前镜像的全部信息
|
|
|
const mirrorRes = await models.Mirror.findOne({ |
|
|
const mirrorRes = await models.Mirror.findOne({ |
|
|
attributes: { |
|
|
attributes: { |
|
@ -284,6 +285,9 @@ async function get (ctx) { |
|
|
|
|
|
|
|
|
let returnData |
|
|
let returnData |
|
|
if (mirrorRes) { |
|
|
if (mirrorRes) { |
|
|
|
|
|
if (check && !mirrorRes.publish) { |
|
|
|
|
|
throw '尚未发布' |
|
|
|
|
|
} |
|
|
const { mirrorCameras, mirrorFilterGroups, mirrorTrees } = mirrorRes.dataValues |
|
|
const { mirrorCameras, mirrorFilterGroups, mirrorTrees } = mirrorRes.dataValues |
|
|
returnData = { |
|
|
returnData = { |
|
|
...mirrorRes.dataValues, |
|
|
...mirrorRes.dataValues, |
|
|