From 96a717a9e9561257d1d0aaffe8315fd49593a0aa Mon Sep 17 00:00:00 2001 From: hupeh Date: Wed, 4 Jan 2023 00:01:19 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20:sparkles:=20=E4=B8=AD=E9=97=B4?= =?UTF-8?q?=E4=BB=B6=E6=A0=A1=E9=AA=8C=E6=97=B6=E9=A2=84=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/fns.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/fns.go b/app/fns.go index 5888c08..a9cc491 100644 --- a/app/fns.go +++ b/app/fns.go @@ -117,7 +117,7 @@ func CheckAuthToken(next http.Handler) http.Handler { NewResponseWriter(w).Error(ErrInvalidToken) } else { var ut UserToken - err = DB.First(&ut, "code = ?", codeString).Error + err = DB.Model(&UserToken{}).Preload("User").First(&ut, "code = ?", codeString).Error if err != nil { NewResponseWriter(w).Error(ErrInvalidToken) } else {