提交文件api还需要完善
This commit is contained in:
@@ -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,所以直接在数据库删除应该是安全的
|
||||
|
||||
Reference in New Issue
Block a user