Skip to content
This repository was archived by the owner on Jan 4, 2022. It is now read-only.

Commit f8ccd5c

Browse files
authored
Merge pull request #17 from Michael-Hanley/patch-1
Update last_updated sort for API expected value
2 parents 3d5bdf6 + 17fdb1b commit f8ccd5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,8 +236,8 @@ class CodeGovAPIClient {
236236
const sortNormalized = sort.toLowerCase().trim()
237237
if (sortNormalized === 'a-z' || sortNormalized === 'name__asc') {
238238
url += `&sort=name__asc`
239-
} else if (sortNormalized === 'last_update') {
240-
url += `&sort=last_updated`
239+
} else if (sortNormalized === 'last_updated') {
240+
url += `&sort=lastModified__desc`
241241
} else if (sortNormalized === 'data_quality') {
242242
console.log("don't have to add data_quality as sort parameter because this is on by default")
243243
}

0 commit comments

Comments
 (0)