added sessions and flash storage

This commit is contained in:
2018-04-07 14:37:07 +01:00
parent 971f157307
commit b8f8c995c1
10 changed files with 263 additions and 39 deletions

View File

@@ -14,12 +14,13 @@ type Route struct {
Env string
Middleware MiddlewareStack
Logger *logrus.Logger
app *App
}
func (r *Route) ServeHTTP(res http.ResponseWriter, req *http.Request) {
defer gcontext.Clear(req)
c := newContext(*r, res, req)
c := r.app.newContext(*r, res, req)
err := r.Middleware.handler(r)(c)