From 4a04612393cc391718e6ac441194e471d83e3416 Mon Sep 17 00:00:00 2001 From: alemi Date: Mon, 2 Dec 2024 23:46:39 +0100 Subject: [PATCH] fix: not called sid in db --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 0308470..c56b7ee 100644 --- a/src/main.rs +++ b/src/main.rs @@ -243,7 +243,7 @@ impl Database { async fn get(&self, sid: i64, limit: Option) -> rusqlite::Result> { let db = self.0.lock().await; - let mut stmt = db.prepare("SELECT time, value FROM events WHERE sid = :sid LIMIT :limit")?; + let mut stmt = db.prepare("SELECT time, value FROM events WHERE service = :sid LIMIT :limit")?; let results = stmt.query_map( named_params! { ":sid": sid, ":limit": limit }, |row| Ok((row.get(0)?, row.get(1).optional()?)),