Skip to content

Commit

Permalink
fix missing WithTotal json field names
Browse files Browse the repository at this point in the history
  • Loading branch information
IngoRoessner committed Dec 11, 2023
1 parent 9d1ba7f commit 6323e48
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/client/generics.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ func Query[Result any](client Client, token string, query model.QueryMessage) (r
}

type WithTotal[Result any] struct {
Total int64
Result Result
Total int64 `json:"total"`
Result Result `json:"result"`
}

func QueryWithTotal[Result any](client Client, token string, query model.QueryMessage) (result WithTotal[Result], code int, err error) {
Expand Down
4 changes: 2 additions & 2 deletions lib/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -1134,8 +1134,8 @@ func (this *Query) GetListWithSelection(token auth.Token, kind string, queryComm
}

type WithTotal struct {
Total int64
Result interface{}
Total int64 `json:"total"`
Result interface{} `json:"result"`
}

func (this *Query) Query(tokenStr string, query model.QueryMessage) (result interface{}, code int, err error) {
Expand Down

0 comments on commit 6323e48

Please sign in to comment.