Drop redundant internal utils

Signed-off-by: Sean Du <do4suki@gmail.com>
This commit is contained in:
2026-06-03 23:22:33 +08:00
parent f255b25a2e
commit 9b367594ba
14 changed files with 29 additions and 46 deletions
+1 -3
View File
@@ -4,7 +4,6 @@ import (
"honoka-chan/internal/middleware"
"honoka-chan/internal/router"
webuischema "honoka-chan/internal/schema/webui"
"honoka-chan/internal/utils"
"honoka-chan/pkg/db"
"net/http"
@@ -29,8 +28,7 @@ func login(ctx *gin.Context) {
exists, err := db.UserEng.Table("users").
Where("phone = ? AND password = ?", user, openssl.Md5ToString(pass)).
Cols("user_id").Get(&userId)
utils.CheckErr(err)
if !exists {
if err != nil || !exists {
ctx.JSON(http.StatusOK, webuischema.Msg{
Code: 1,
Message: "账号不存在或者密码有误!",