From 743e2bc4d2b8fe22207c787b12211af19cc8984f Mon Sep 17 00:00:00 2001 From: zhouyonggao <1971162852@qq.com> Date: Sat, 20 Dec 2025 15:54:21 +0800 Subject: [PATCH] =?UTF-8?q?fix(api):=20=E4=BF=AE=E6=94=B9=20YMTUsersAPI=20?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=96=B9=E6=B3=95=E4=BB=A5=E5=BF=BD=E7=95=A5?= =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=85=B3=E9=94=AE=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 list 方法中,始终返回所有用户数据,忽略查询参数 q。 - 将 keyword 变量设置为空字符串,以确保不进行过滤。 --- server/internal/api/ymt_users.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server/internal/api/ymt_users.go b/server/internal/api/ymt_users.go index f7475ff..836c33d 100644 --- a/server/internal/api/ymt_users.go +++ b/server/internal/api/ymt_users.go @@ -54,8 +54,10 @@ func (a *YMTUsersAPI) list(w http.ResponseWriter, r *http.Request) { } } + // 忽略 q 参数,始终返回所有数据(不做过滤) // 获取搜索关键词(如果有) - keyword := r.URL.Query().Get("q") + // keyword := r.URL.Query().Get("q") + keyword := "" // 始终传空字符串,返回所有数据 // 创建带超时的 context ctx, cancel := context.WithTimeout(r.Context(), 10*time.Second)