Modify: use uri parameter in Get File

This commit is contained in:
HFO4
2019-11-29 15:24:23 +08:00
parent 2c2ee5b1c1
commit 0cbbe5bb79
5 changed files with 15 additions and 8 deletions

View File

@@ -11,12 +11,17 @@ func SetSession(c *gin.Context, list map[string]interface{}) {
for key, value := range list {
s.Set(key, value)
}
s.Save()
err := s.Save()
if err != nil {
Log().Warning("无法设置 Session 值:%s", err)
}
}
// GetSession 获取session
func GetSession(c *gin.Context, key string) interface{} {
s := sessions.Default(c)
Log().Debug("Key:%s Val:%s", key, s.Get(key))
return s.Get(key)
}