diff --git a/http/router/action/router.go b/http/router/action/router.go index 481357a..22b6175 100644 --- a/http/router/action/router.go +++ b/http/router/action/router.go @@ -20,7 +20,7 @@ import ( "github.com/xgfone/go-apiserver/http/middleware" "github.com/xgfone/go-apiserver/http/reqresp" - "github.com/xgfone/go-apiserver/result/code" + "github.com/xgfone/go-apiserver/result/codeint" ) // HeaderAction is the http header to store the action method. @@ -106,9 +106,9 @@ func (r *Router) ServeHTTP(rw http.ResponseWriter, req *http.Request) { func notFoundHandler(resp http.ResponseWriter, req *http.Request) { c := reqresp.GetContext(req.Context()) if len(c.Action) == 0 { - code.ErrBadRequestInvalidAction.WithMessage("missing the action").Respond(c) + codeint.ErrBadRequest.WithMessage("missing the action").Respond(c) } else { - code.ErrBadRequestInvalidAction.WithMessage("action '%s' is unsupported", c.Action).Respond(c) + codeint.ErrBadRequest.WithMessage("action '%s' is unsupported", c.Action).Respond(c) } }