Skip to content

Commit

Permalink
Merge pull request #1 from ursiform/autodiscovery
Browse files Browse the repository at this point in the history
Closing autodiscovery branch.
  • Loading branch information
afshin committed Apr 9, 2016
2 parents e6c8de7 + 9894ca9 commit 0ced7ce
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func SessionGet(app *forest.App, manager SessionManager) func(ctx *bear.Context)
return func(ctx *bear.Context) {
cookieName := forest.SessionID
createEmptySession := func(sessionID string) {
path := app.CookiePath
path := app.CookiePath()
if path == "" {
path = "/"
}
Expand Down Expand Up @@ -85,7 +85,7 @@ func SessionGet(app *forest.App, manager SessionManager) func(ctx *bear.Context)
// if it's not set or if it's set to true, the session is refreshed.
refresh, ok := ctx.Get(forest.SessionRefresh).(bool)
if !ok || refresh {
path := app.CookiePath
path := app.CookiePath()
if path == "" {
path = "/"
}
Expand Down
2 changes: 1 addition & 1 deletion wares-test_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func TestSafeErrorFilter(t *testing.T) {
method, path, customUnsafeErrorMessage)
}
// test unsafe errors passing through if app.Debug is true
app.Debug = true
app.SetDebug(true)
path = root + "/safe-error/failure"
params = &requested{method: method, path: path}
want = &wanted{code: http.StatusInternalServerError, success: false}
Expand Down
2 changes: 1 addition & 1 deletion wares.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func safeErrorMessage(app *forest.App, ctx *bear.Context,
}

func safeErrorFilter(app *forest.App, err error, friendly string) error {
if app.Debug {
if app.Debug() {
return err
} else {
if app.SafeErrorFilter != nil {
Expand Down

0 comments on commit 0ced7ce

Please sign in to comment.