summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/main.rs22
-rw-r--r--server/src/models/mod.rs2
-rw-r--r--server/src/models/user.rs (renamed from server/src/models/users.rs)0
3 files changed, 2 insertions, 22 deletions
diff --git a/server/src/main.rs b/server/src/main.rs
index 8319fb2..a61e44b 100644
--- a/server/src/main.rs
+++ b/server/src/main.rs
@@ -5,10 +5,8 @@ mod models;
use axum::{
http::{header, Request},
- routing::get,
- Json, Router,
+ Router,
};
-use serde::Serialize;
use std::time::Duration;
use tower_http::sensitive_headers::SetSensitiveHeadersLayer;
use tower_http::{classify::ServerErrorsFailureClass, trace::TraceLayer};
@@ -33,7 +31,6 @@ async fn create_app() -> Router {
let _ = db::setup().await;
Router::new()
- .route("/", get(hej))
// Mark the `Authorization` request header as sensitive so it doesn't
// show in logs.
.layer(SetSensitiveHeadersLayer::new(std::iter::once(
@@ -51,20 +48,3 @@ async fn create_app() -> Router {
),
)
}
-
-// Example root which says hi
-async fn hej() -> Result<Json<Vec<models::users::User>>, errors::AppError> {
- let users = models::users::User::list().await?;
- Ok(Json(users))
-}
-
-#[derive(Debug, Serialize)]
-struct Hej {
- hello: String,
-}
-
-impl Hej {
- fn new(hello: String) -> Self {
- Self { hello }
- }
-}
diff --git a/server/src/models/mod.rs b/server/src/models/mod.rs
index 913bd46..22d12a3 100644
--- a/server/src/models/mod.rs
+++ b/server/src/models/mod.rs
@@ -1 +1 @@
-pub mod users;
+pub mod user;
diff --git a/server/src/models/users.rs b/server/src/models/user.rs
index d7a836f..d7a836f 100644
--- a/server/src/models/users.rs
+++ b/server/src/models/user.rs