
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.
16 lines
347 B
Rust
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)
|
|
}
|