Skip to content

Commit 5a14c2b

Browse files
committed
feat(mods): add sort by oldest
1 parent fa5230d commit 5a14c2b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/endpoints/mods.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ pub enum IndexSortType {
2929
Downloads,
3030
RecentlyUpdated,
3131
RecentlyPublished,
32+
Oldest,
3233
Name,
3334
NameReverse,
3435
}

src/types/models/mod_entity.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,7 @@ impl Mod {
199199
IndexSortType::Downloads => "q.download_count DESC",
200200
IndexSortType::RecentlyUpdated => "q.updated_at DESC",
201201
IndexSortType::RecentlyPublished => "q.created_at DESC",
202+
IndexSortType::Oldest => "q.created_at ASC",
202203
IndexSortType::Name => "q.name ASC",
203204
IndexSortType::NameReverse => "q.name DESC",
204205
};

0 commit comments

Comments
 (0)