diff options
Diffstat (limited to 'server/src/main.rs')
-rw-r--r-- | server/src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/main.rs b/server/src/main.rs index 3b080eb..8319fb2 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -1,6 +1,7 @@ mod db; mod errors; mod logger; +mod models; use axum::{ http::{header, Request}, @@ -52,8 +53,9 @@ async fn create_app() -> Router { } // Example root which says hi -async fn hej() -> Result<Json<Hej>, errors::AppError> { - Ok(Json(Hej::new("hej verden".to_string()))) +async fn hej() -> Result<Json<Vec<models::users::User>>, errors::AppError> { + let users = models::users::User::list().await?; + Ok(Json(users)) } #[derive(Debug, Serialize)] |