Skip to content

Commit

Permalink
Fixed correct ordering of posts
Browse files Browse the repository at this point in the history
  • Loading branch information
f-r00t committed Mar 7, 2024
1 parent f18646f commit b5d7611
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions services/postEncryptedGroupService.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ postEncryptedGroupService.getAll = async (limit, offset, order, searchKeyword, s
let query = {
limit: limit,
order: [
['id', order ? order.toUpperCase() : 'DESC'],
['created_at', order ? order.toUpperCase() : 'ASC'],
],
offset: offset,
}
Expand Down Expand Up @@ -93,7 +93,7 @@ postEncryptedGroupService.getLatest = async (limit, offset, order, searchKeyword
let query = {
limit: limit,
order: [
['id', order ? order.toUpperCase() : 'DESC'],
['created_at', order ? order.toUpperCase() : 'DESC'],
],
offset: offset,
}
Expand Down
4 changes: 2 additions & 2 deletions services/postEncryptedService.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ postEncryptedService.getAll = async (limit, offset, order, searchKeyword, startD
let query = {
limit: limit,
order: [
['id', order ? order.toUpperCase() : 'DESC'],
['created_at', order ? order.toUpperCase() : 'ASC'],
],
offset: offset,
}
Expand Down Expand Up @@ -93,7 +93,7 @@ postEncryptedService.getLatest = async (limit, offset, order, searchKeyword, sta
let query = {
limit: limit,
order: [
['id', order ? order.toUpperCase() : 'DESC'],
['created_at', order ? order.toUpperCase() : 'DESC'],
],
offset: offset,
}
Expand Down

0 comments on commit b5d7611

Please sign in to comment.