quote frontend init, chips, basic stats

This commit is contained in:
2026-03-09 22:56:13 +01:00
parent 4a4e97f7be
commit 9e678c5586
12 changed files with 216 additions and 4 deletions

View File

@@ -45,6 +45,11 @@ pub enum UserError {
}
impl User {
pub fn total_count() -> Result<i64, UserError> {
let conn = database::conn()?;
let count: i64 = conn.query_row("SELECT COUNT(*) FROM users", (), |r| r.get(0))?;
Ok(count)
}
pub fn get_by_id(id: Uuid) -> Result<User, UserError> {
let res = database::conn()?
.prepare("SELECT handle FROM users WHERE id = ?1")?