Added Status method
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user