feat: add new sorting option to categories

add new zset for category topics
fix sorting names
This commit is contained in:
Barış Soner Uşaklı
2024-03-04 16:06:04 -05:00
parent db2f7c0331
commit 2a9b0a3c9c
15 changed files with 107 additions and 24 deletions

View File

@@ -124,7 +124,7 @@ categoriesAPI.getTopics = async (caller, data) => {
}
const infScrollTopicsPerPage = 20;
const sort = data.sort || data.categoryTopicSort || meta.config.categoryTopicSort || 'newest_to_oldest';
const sort = data.sort || data.categoryTopicSort || meta.config.categoryTopicSort || 'recently_replied';
let start = Math.max(0, parseInt(data.after || 0, 10));