From bb072b8ad2386f5da4ca46eab6bf6fd1680b8678 Mon Sep 17 00:00:00 2001 From: Manuel Imperiale Date: Thu, 8 Jul 2021 16:14:49 +0200 Subject: [PATCH] NOISSUE - Fix httputil implementation in users service (#1434) Signed-off-by: Manuel Imperiale --- users/api/transport.go | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/users/api/transport.go b/users/api/transport.go index 3716f4a1..bb59d495 100644 --- a/users/api/transport.go +++ b/users/api/transport.go @@ -132,17 +132,14 @@ func decodeViewProfile(_ context.Context, r *http.Request) (interface{}, error) func decodeListUsers(_ context.Context, r *http.Request) (interface{}, error) { o, err := httputil.ReadUintQuery(r, offsetKey, defOffset) - if err != nil && err != errors.ErrNotFoundParam { + if err != nil { return nil, err } l, err := httputil.ReadUintQuery(r, limitKey, defLimit) - if err != nil && err != errors.ErrNotFoundParam { + if err != nil { return nil, err } - if err == errors.ErrNotFoundParam { - l = defLimit - } e, err := httputil.ReadStringQuery(r, emailKey, "") if err != nil { @@ -232,17 +229,14 @@ func decodePasswordChange(_ context.Context, r *http.Request) (interface{}, erro func decodeListMembersRequest(_ context.Context, r *http.Request) (interface{}, error) { o, err := httputil.ReadUintQuery(r, offsetKey, defOffset) - if err != nil && err != errors.ErrNotFoundParam { + if err != nil { return nil, err } l, err := httputil.ReadUintQuery(r, limitKey, defLimit) - if err != nil && err != errors.ErrNotFoundParam { + if err != nil { return nil, err } - if err == errors.ErrNotFoundParam { - l = defLimit - } m, err := httputil.ReadMetadataQuery(r, metadataKey, nil) if err != nil {