From 66a8ea2eedbd9ca6b28cc3e709ee6b1091f43b5e Mon Sep 17 00:00:00 2001 From: "gao.zhiyuan" Date: Tue, 20 Sep 2022 16:16:20 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E7=BB=91=E5=AE=9A=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E4=B8=8E=E5=BA=94=E7=94=A8=E4=BF=A1=E6=81=AF=E7=BB=91?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/lib/controllers/project/bind.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/app/lib/controllers/project/bind.js b/api/app/lib/controllers/project/bind.js index 9f7f035..b79d089 100644 --- a/api/app/lib/controllers/project/bind.js +++ b/api/app/lib/controllers/project/bind.js @@ -9,6 +9,10 @@ async function bindAnxin2pep (ctx) { const { userId, pepUserId } = ctx.fs.api const { bindId, name, pepProjectId, anxinProjectId = [], appId = [] } = ctx.request.body + if(name && pepProjectId){ + throw '项企项目与自定义项目名称仅可选择一项' + } + let bindId_ = bindId const now = moment() const existRes = await models.ProjectCorrelation.findOne({