mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 17:41:57 +08:00
Modify: use uri parameter in Get File
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user