From 336f944f1cf268d55d27214c2304532a5f07d089 Mon Sep 17 00:00:00 2001 From: Karan Kajla Date: Wed, 21 Jun 2023 16:05:33 -0700 Subject: [PATCH] Fix typo in object and objecttype package list middleware error messages (#167) --- pkg/authz/object/list.go | 2 +- pkg/authz/objecttype/list.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/authz/object/list.go b/pkg/authz/object/list.go index 933b5185..1027d6b4 100644 --- a/pkg/authz/object/list.go +++ b/pkg/authz/object/list.go @@ -22,7 +22,7 @@ func (parser ObjectListParamParser) ParseValue(val string, sortBy string) (inter case "createdAt": afterValue, err := time.Parse(time.RFC3339, val) if err != nil || afterValue.Equal(time.Time{}) { - return nil, fmt.Errorf("must be a valid time in the %s", time.RFC3339) + return nil, fmt.Errorf("must be a valid time in the format %s", time.RFC3339) } return &afterValue, nil diff --git a/pkg/authz/objecttype/list.go b/pkg/authz/objecttype/list.go index cdd36121..9ed199ce 100644 --- a/pkg/authz/objecttype/list.go +++ b/pkg/authz/objecttype/list.go @@ -23,7 +23,7 @@ func (parser ObjectTypeListParamParser) ParseValue(val string, sortBy string) (i case "createdAt": afterValue, err := time.Parse(time.RFC3339, val) if err != nil || afterValue.Equal(time.Time{}) { - return nil, fmt.Errorf("must be a valid time in the %s", time.RFC3339) + return nil, fmt.Errorf("must be a valid time in the format %s", time.RFC3339) } return &afterValue, nil