Greenstand / treetracker-wallet-api

GNU Affero General Public License v3.0
18 stars 53 forks source link

#391: Addition of sort_by Query Parameter #418

Closed XLPeng57 closed 1 year ago

XLPeng57 commented 1 year ago

Added the sort_by parameter which allows clients to specify the column by which they wish to sort the transfer results.

Usage:

  1. Column Specification: The possible values for this parameter are defined in TransferEnums.SORT
  2. Direction Specification: To sort in descending order for the specified column, simply prefix the value with a -. Example:
    • Sort by created_at in ascending order: .../transfers?...&sort_by=created_at
    • Sort by created_at in descending order: .../transfers?...&sort_by=-created_at
  3. If no sort_by is provided, the results would be sorted by _createdat in descending order.
pranavkparti commented 1 year ago

Resolves #391.

XLPeng57 commented 1 year ago

@Kpoke Hi Daniel, I've added the 'order' query parameter and set its default value to 'desc'.

github-actions[bot] commented 1 year ago

:tada: This PR is included in version 1.29.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: