Skip to content

Commit

Permalink
MG-2056 - List Domains not showing domains (#2226)
Browse files Browse the repository at this point in the history
Signed-off-by: JeffMboya <[email protected]>
  • Loading branch information
JeffMboya authored May 13, 2024
1 parent 75db28c commit 4d18c8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion auth/api/http/domains/decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func decodeListUserDomainsRequest(ctx context.Context, r *http.Request) (interfa
}

func decodePageRequest(_ context.Context, r *http.Request) (page, error) {
s, err := apiutil.ReadStringQuery(r, api.StatusKey, auth.All)
s, err := apiutil.ReadStringQuery(r, api.StatusKey, api.DefClientStatus)
if err != nil {
return page{}, errors.Wrap(apiutil.ErrValidation, err)
}
Expand Down
4 changes: 3 additions & 1 deletion auth/api/http/domains/endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import (
"context"

"github.com/absmach/magistrala/auth"
"github.com/absmach/magistrala/internal/apiutil"
"github.com/absmach/magistrala/pkg/clients"
"github.com/absmach/magistrala/pkg/errors"
"github.com/go-kit/kit/endpoint"
)

Expand Down Expand Up @@ -93,7 +95,7 @@ func listDomainsEndpoint(svc auth.Service) endpoint.Endpoint {
return func(ctx context.Context, request interface{}) (interface{}, error) {
req := request.(listDomainsReq)
if err := req.validate(); err != nil {
return nil, err
return nil, errors.Wrap(apiutil.ErrValidation, err)
}

page := auth.Page{
Expand Down

0 comments on commit 4d18c8b

Please sign in to comment.