🗃️ Realm popularity field & sorting communities according to it

This commit is contained in:
2025-02-20 21:42:19 +08:00
parent a2d033b56c
commit bac655c1cf
2 changed files with 2 additions and 1 deletions

View File

@ -15,7 +15,7 @@ func ListCommunityRealm() ([]models.Realm, error) {
var realms []models.Realm
if err := database.C.Where(&models.Realm{
IsCommunity: true,
}).Find(&realms).Error; err != nil {
}).Order("popularity DESC").Find(&realms).Error; err != nil {
return realms, err
}