Skip to content

Commit

Permalink
Execute responder
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhu committed Jul 6, 2017
1 parent b2b6ad5 commit e1613d6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ var DefaultLoginHandler = func(context *Context, authorize func(*Context) (*clai

// error handling
responder.With("html", func() {
context.SessionManager.Flash(req, session.Message{Message: "failed to login"})
context.Auth.Config.Render.Execute("auth/login", context, req, w)
}).With([]string{"json"}, func() {
// write json error
})
}).Respond(context.Request)
}

// DefaultRegisterHandler default register behaviour
Expand All @@ -67,7 +66,7 @@ var DefaultRegisterHandler = func(context *Context, register func(*Context) (*cl
context.Auth.Config.Render.Execute("auth/register", context, req, w)
}).With([]string{"json"}, func() {
// write json error
})
}).Respond(context.Request)
}

// DefaultLogoutHandler default logout behaviour
Expand Down

0 comments on commit e1613d6

Please sign in to comment.