diff --git a/api/app/lib/controllers/projectBind/projectBind.js b/api/app/lib/controllers/projectBind/projectBind.js index 67ec248..c4e869b 100644 --- a/api/app/lib/controllers/projectBind/projectBind.js +++ b/api/app/lib/controllers/projectBind/projectBind.js @@ -63,8 +63,12 @@ async function addorEditRelation(ctx, next) { err='所选安心云结构物和巡检结构物重复!!!' throw '所选安心云结构物和巡检结构物重复!!!' } - await models.ProjectBind.update({ axyProjectId, structrueId }, { where: { id } }) + await models.ProjectBind.update({ axyProjectId, structureId:structrueId }, { where: { id } }) + ctx.status = 204 + ctx.body = { + message: '编辑成功!!', + } } else { //新增 const res= await models.ProjectBind.findOne({ where: { axyProjectId,structureId:structrueId } }) @@ -74,6 +78,9 @@ async function addorEditRelation(ctx, next) { } await models.ProjectBind.create({ axyProjectId, structureId:structrueId }) ctx.status = 204 + ctx.body = { + message: '新增成功!!', + } } } catch (error) { ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`)