diff --git a/source/cli/run.rs b/source/cli/run.rs index 9ff2030..4ad40ae 100644 --- a/source/cli/run.rs +++ b/source/cli/run.rs @@ -102,7 +102,7 @@ pub async fn run() -> Result<()> { if let Some(snapshot) = SnapshotModel::get_most_recent(&db).await? { ( GroupDataModel::get_all_by_snapshot(&db, &snapshot).await?, - GroupDataModel::get_highest_subscribers(&db, &snapshot).await?, + GroupDataModel::get_tildes_official_data(&db, &snapshot).await?, ) } else { (vec![], None) diff --git a/source/group_data/mod.rs b/source/group_data/mod.rs index 1d521ab..a59d527 100644 --- a/source/group_data/mod.rs +++ b/source/group_data/mod.rs @@ -28,14 +28,15 @@ impl GroupDataModel { Ok(groups) } - /// Get the group with the highest subscriber count from a given snapshot. - pub async fn get_highest_subscribers( + /// Get the group data for ~tildes.official. + pub async fn get_tildes_official_data( db: &DatabaseConnection, snapshot: &SnapshotModel, ) -> Result> { let group = snapshot .find_related(GroupDataEntity) .order_by_desc(GroupDataColumn::Subscribers) + .filter(GroupDataColumn::Name.eq("~tildes.official")) .one(db) .await?; diff --git a/source/templates/index.html b/source/templates/index.html index 905f81a..eda4c32 100644 --- a/source/templates/index.html +++ b/source/templates/index.html @@ -46,7 +46,7 @@ {{ group.subscribers }} ({{ group.subscribers|percentage(user_count) }})