Skip to content

Commit 0e145b0

Browse files
committed
update sort by enum type
1 parent 4b6812d commit 0e145b0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

auth/user_mgt.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ type QueryUsersRequest struct {
10711071
ReturnUserInfo bool `json:"returnUserInfo"`
10721072
Limit int64 `json:"limit,string,omitempty"`
10731073
Offset int64 `json:"offset,string,omitempty"`
1074-
SortBy SortByField `json:"-"`
1074+
SortBy SortBy `json:"-"`
10751075
Order Order `json:"-"`
10761076
TenantID string `json:"tenantId,omitempty"`
10771077
Expression []*SQLExpression `json:"expression,omitempty"`
@@ -1081,7 +1081,7 @@ type QueryUsersRequest struct {
10811081
func (q *QueryUsersRequest) MarshalJSON() ([]byte, error) {
10821082
var sortBy string
10831083
if q.SortBy != sortByUnspecified {
1084-
sortBys := map[SortByField]string{
1084+
sortBys := map[SortBy]string{
10851085
UID: "USER_ID",
10861086
Name: "NAME",
10871087
CreatedAt: "CREATED_AT",
@@ -1113,11 +1113,11 @@ func (q *QueryUsersRequest) MarshalJSON() ([]byte, error) {
11131113
return json.Marshal(temp)
11141114
}
11151115

1116-
// SortByField is a field to use for sorting user accounts.
1117-
type SortByField int
1116+
// SortBy is a field to use for sorting user accounts.
1117+
type SortBy int
11181118

11191119
const (
1120-
sortByUnspecified SortByField = iota
1120+
sortByUnspecified SortBy = iota
11211121
// UID sorts results by userId.
11221122
UID
11231123
// Name sorts results by name.

0 commit comments

Comments
 (0)