aboutsummaryrefslogtreecommitdiffstats
path: root/crates/atuin-server/src/handlers/mod.rs
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@atuin.sh>2026-01-23 12:27:43 -0800
committerGitHub <noreply@github.com>2026-01-23 12:27:43 -0800
commit126070068abda34fda0b880a36cc604b4ac8be2a (patch)
tree1b5529df0adca1a228fa107bfe2ee9bf240e7f61 /crates/atuin-server/src/handlers/mod.rs
parentchore(deps)!: update tls deps, remove built-in tls server support (#3091) (diff)
downloadatuin-126070068abda34fda0b880a36cc604b4ac8be2a.zip
chore!: remove total_history from api index response (#3094)
Remove the expensive and inaccurate `total_history` field from the API index endpoint. The query `select sum(total) from total_history_count_user` ran on every request but is no longer relevant. The underlying table remains for per-user cached counts used by `/sync/count`. ## Checks - [x] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle - [x] I have checked that there are no existing pull requests for the same thing
Diffstat (limited to 'crates/atuin-server/src/handlers/mod.rs')
-rw-r--r--crates/atuin-server/src/handlers/mod.rs5
1 files changed, 0 insertions, 5 deletions
diff --git a/crates/atuin-server/src/handlers/mod.rs b/crates/atuin-server/src/handlers/mod.rs
index 1b9fd162..2176ac5e 100644
--- a/crates/atuin-server/src/handlers/mod.rs
+++ b/crates/atuin-server/src/handlers/mod.rs
@@ -16,10 +16,6 @@ const VERSION: &str = env!("CARGO_PKG_VERSION");
pub async fn index<DB: Database>(state: State<AppState<DB>>) -> Json<IndexResponse> {
let homage = r#""Through the fathomless deeps of space swims the star turtle Great A'Tuin, bearing on its back the four giant elephants who carry on their shoulders the mass of the Discworld." -- Sir Terry Pratchett"#;
- // Error with a -1 response
- // It's super unlikely this will happen
- let count = state.database.total_history().await.unwrap_or(-1);
-
let version = state
.settings
.fake_version
@@ -28,7 +24,6 @@ pub async fn index<DB: Database>(state: State<AppState<DB>>) -> Json<IndexRespon
Json(IndexResponse {
homage: homage.to_string(),
- total_history: count,
version,
})
}