Skip to content

Commit

Permalink
add order direction
Browse files Browse the repository at this point in the history
  • Loading branch information
borispoehland committed Dec 16, 2024
1 parent 5763fdb commit dc74059
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/users/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -448,10 +448,12 @@ export class UserModule {
top,
skip,
orderBy,
orderDirection,
}: {
top: number
skip: number
orderBy: string
orderDirection?: string
}): Promise<UserStats[]> => {
if (top && top > 35) {
throw new Error('Top cannot be greater than 100')
Expand All @@ -461,7 +463,8 @@ export class UserModule {
params: {
top: top,
skip: skip,
orderBy: orderBy ?? 'totalVolume',
orderBy: orderBy,
orderDirection: orderDirection ?? 'desc',
},
next: {
tags: ['/user/stats'],
Expand Down

0 comments on commit dc74059

Please sign in to comment.