Added Status method
This commit is contained in:
parent
ee0acd473b
commit
1e8a846457
5 changed files with 17 additions and 13 deletions
|
@ -27,11 +27,11 @@ func TestRouter(t *testing.T) {
|
|||
})
|
||||
|
||||
s.Get("/error", func(ctx server.Context) error {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in")
|
||||
return ctx.Status(http.StatusUnauthorized).Error("Not logged in")
|
||||
})
|
||||
|
||||
s.Get("/error2", func(ctx server.Context) error {
|
||||
return ctx.Error(http.StatusUnauthorized, "Not logged in", errors.New("Missing auth token"))
|
||||
return ctx.Status(http.StatusUnauthorized).Error("Not logged in", errors.New("Missing auth token"))
|
||||
})
|
||||
|
||||
s.Get("/reader", func(ctx server.Context) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue