Skip to content

Commit 368b5cc

Browse files
committed
fix ordering by created_At
1 parent fc50cbc commit 368b5cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/modules/images/repository/mongo/repository.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ class Repository {
2929
category: category,
3030
})
3131

32-
if (['created_at'].includes(sort_order)) {
32+
if (['created_at'].includes(sort_by)) {
3333
Object.assign(sort, {
34-
sort_order: sort_by,
34+
[sort_by]: sort_order,
3535
})
3636
}
3737

0 commit comments

Comments
 (0)