use actix_web::{get, web, HttpResponse}; use crate::templates; use crate::users::User; use crate::{Pinussy, Result}; #[get("/users")] async fn get(state: web::Data) -> Result { let users: Vec = state.db.users().read_all().await?; Ok(HttpResponse::Ok().body(render!(templates::users_html, users).unwrap())) }