mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: captcha
This commit is contained in:
@@ -14,6 +14,19 @@ func SetSession(c *gin.Context, list map[string]interface{}) {
|
||||
s.Save()
|
||||
}
|
||||
|
||||
// GetSession 获取session
|
||||
func GetSession(c *gin.Context, key string) interface{} {
|
||||
s := sessions.Default(c)
|
||||
return s.Get(key)
|
||||
}
|
||||
|
||||
// DeleteSession 删除session
|
||||
func DeleteSession(c *gin.Context, key string) {
|
||||
s := sessions.Default(c)
|
||||
s.Delete(key)
|
||||
s.Save()
|
||||
}
|
||||
|
||||
// ClearSession 清空session
|
||||
func ClearSession(c *gin.Context) {
|
||||
s := sessions.Default(c)
|
||||
|
||||
Reference in New Issue
Block a user