Skip to content

Commit

Permalink
fix: order by calculated at
Browse files Browse the repository at this point in the history
  • Loading branch information
dadiorchen committed Mar 16, 2022
1 parent 4b0d90c commit 4f7b6df
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/api/spec/treetracker-earnings-api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ paths:
- funder
- amount
- payment_method
- effective_payment_date
- calculated_at
in: query
name: sort_by
description: column with which to sort by
Expand Down
2 changes: 1 addition & 1 deletion server/handlers/earningsHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const earningsGetQuerySchema = Joi.object({
'funder',
'amount',
'payment_method',
'effective_payment_date',
'calculated_at',
'status',
'paid_at',
),
Expand Down
2 changes: 1 addition & 1 deletion server/models/Earnings.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ const FilterCriteria = ({
case 'payment_method':
orderBy = 'payment_method';
break;
case 'effective_payment_date':
case 'calculated_at':
orderBy = 'calculated_at';
break;
default:
Expand Down

0 comments on commit 4f7b6df

Please sign in to comment.