church-api/src/db/users.rs
Benjamin Slingo 0c06e159bb Initial commit: Church API Rust implementation
Complete church management system with bulletin management, media processing, live streaming integration, and web interface. Includes authentication, email notifications, database migrations, and comprehensive test suite.
2025-08-19 20:56:41 -04:00

16 lines
347 B
Rust

use sqlx::PgPool;
use crate::{error::Result, models::User};
pub async fn list(pool: &PgPool) -> Result<Vec<User>> {
let users = sqlx::query_as!(
User,
"SELECT id, username, email, name, avatar_url, role, verified, created_at, updated_at FROM users ORDER BY username"
)
.fetch_all(pool)
.await?;
Ok(users)
}