From 0d8e1cc7c47b0936a1af1f1946008ab4cead2ebd Mon Sep 17 00:00:00 2001 From: maxwell Date: Wed, 9 Oct 2024 08:06:25 +0800 Subject: [PATCH] update --- middleware/student.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/student.go b/middleware/student.go index 06cad6a..bc7a54e 100644 --- a/middleware/student.go +++ b/middleware/student.go @@ -60,7 +60,7 @@ func GetUserInfo(redisClient *redis.Storage) fiber.Handler { var result map[string]interface{} json.Unmarshal(body, &result) fmt.Println(result) - if _, ok := result["code"]; !ok || int(result["code"].(float64)) != 1 { + if _, ok := result["code"]; !ok || result["code"].(int) != 1 { return c.Status(http.StatusUnauthorized).JSON(fiber.Map{ "message": "获取学生信息失败,身份证无效", "error": "身份证无效",