Skip to content

Commit

Permalink
chore(SPV-737): clear redundant struct QueryParams
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-4chain committed May 29, 2024
1 parent 299012a commit cf6ef46
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
8 changes: 0 additions & 8 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,6 @@ type Recipients struct {
To string `json:"to"`
}

// QueryParams object to use when limiting and sorting database query results
type QueryParams struct {
Page int `json:"page,omitempty"`
PageSize int `json:"page_size,omitempty"`
OrderByField string `json:"order_by_field,omitempty"`
SortDirection string `json:"sort_direction,omitempty"`
}

const (
// FieldMetadata is the field name for metadata
FieldMetadata = "metadata"
Expand Down
4 changes: 2 additions & 2 deletions http.go
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ func (wc *WalletClient) AdminGetBlockHeaders(
ctx context.Context,
conditions map[string]interface{},
metadata map[string]any,
queryParams *QueryParams,
queryParams *filter.QueryParams,
) ([]*models.BlockHeader, ResponseError) {
var models []*models.BlockHeader
if err := wc.adminGetModels(ctx, conditions, metadata, queryParams, "/admin/block-headers/search", &models); err != nil {
Expand Down Expand Up @@ -997,7 +997,7 @@ func (wc *WalletClient) adminGetModels(
ctx context.Context,
conditions map[string]interface{},
metadata map[string]any,
queryParams *QueryParams,
queryParams *filter.QueryParams,
path string,
models interface{},
) ResponseError {
Expand Down

0 comments on commit cf6ef46

Please sign in to comment.