From 1ba6b3e7140055882c76e00f97e31a383ca77fe2 Mon Sep 17 00:00:00 2001 From: naiba Date: Fri, 20 May 2022 09:05:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=8F=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/dashboard/controller/member_api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/dashboard/controller/member_api.go b/cmd/dashboard/controller/member_api.go index bda8ec7..c5863c3 100644 --- a/cmd/dashboard/controller/member_api.go +++ b/cmd/dashboard/controller/member_api.go @@ -182,9 +182,9 @@ func (ma *memberAPI) delete(c *gin.Context) { index := -1 for i := 0; i < len(singleton.ServerTagToIDList[tag]); i++ { if singleton.ServerTagToIDList[tag][i] == id { + index = i break } - index = i } if index > -1 { // 删除旧 Tag-ID 绑定关系 @@ -328,9 +328,9 @@ func (ma *memberAPI) addOrEditServer(c *gin.Context) { index := -1 for i := 0; i < len(singleton.ServerTagToIDList[s.Tag]); i++ { if singleton.ServerTagToIDList[s.Tag][i] == s.ID { + index = i break } - index = i } if index > -1 { // 删除旧 Tag-ID 绑定关系