Merge pull request #2161 from omnivore-app/feature/sort-by-wordCount

add sorting by wordsCount
This commit is contained in:
Hongbo Wu 2023-05-04 08:56:03 +08:00 committed by GitHub
commit 31d04a59e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -68,6 +68,7 @@ export enum SortBy {
PUBLISHED = 'publishedAt',
READ = 'readAt',
LISTENED = 'listenedAt',
WORDS_COUNT = 'wordsCount',
}
export enum SortOrder {
@ -202,6 +203,11 @@ const parseSortParams = (str?: string): SortParams | undefined => {
by: SortBy.READ,
order: sortOrder,
}
case 'WORDSCOUNT':
return {
by: SortBy.WORDS_COUNT,
order: sortOrder,
}
}
}