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 {