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
+6
View File
@@ -22,6 +22,11 @@ type DefaultRouter struct {
Routes []*Route
StaticRoutes []*StaticRoute
Options *RouterOptions
app *App
}
func (r *DefaultRouter) SetApp(app *App) {
r.app = app
}
func (r *DefaultRouter) GET(path string, h Handler) {
@@ -67,6 +72,7 @@ func (r *DefaultRouter) addRoute(m, p string, h Handler) {
Env: r.Options.Env,
Middleware: r.Options.MiddlewareStack,
Logger: r.Options.Logger,
app: r.app,
})
}