提交文件api还需要完善

This commit is contained in:
2025-06-30 18:42:39 +08:00
parent 18c2cb9d4a
commit a6e4d6e219
5 changed files with 191 additions and 110 deletions
+3 -4
View File
@@ -1,7 +1,6 @@
package routers
import (
"fmt"
"saas/models"
"strings"
"time"
@@ -157,9 +156,9 @@ func V1_user_api(r *gin.RouterGroup) {
//先判断是否已经登录
//获取中间件处理的结果
user_info, is_login := ctx.Get("user_info")
fmt.Println(is_login)
fmt.Println(user_info)
_, is_login := ctx.Get("user_info")
//fmt.Println(is_login)
//fmt.Println(user_info)
if is_login == true {
//fmt.Println("loged")
cookie_any, _ := ctx.Get("cookie") //这个cookie在中间件已经判断为有效的,否则is_login不可能为true,所以直接在数据库删除应该是安全的