1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

Align sessions with the latest kataras/go-sessions. Now you should update :)

This commit is contained in:
Gerasimos Maropoulos
2016-09-05 13:08:32 +03:00
parent 1537a657c0
commit a073e442fc
4 changed files with 13 additions and 25 deletions

View File

@@ -961,7 +961,7 @@ func (ctx *Context) Session() sessions.Session {
}
if ctx.session == nil {
ctx.session = ctx.framework.sessions.Start(ctx.RequestCtx)
ctx.session = ctx.framework.sessions.StartFasthttp(ctx.RequestCtx)
}
return ctx.session
}
@@ -969,7 +969,7 @@ func (ctx *Context) Session() sessions.Session {
// SessionDestroy destroys the whole session, calls the provider's destroy and remove the cookie
func (ctx *Context) SessionDestroy() {
if sess := ctx.Session(); sess != nil {
ctx.framework.sessions.Destroy(ctx.RequestCtx)
ctx.framework.sessions.DestroyFasthttp(ctx.RequestCtx)
}
}