Update deps

This commit is contained in:
2023-12-10 22:37:06 +01:00
parent ecb6fed506
commit e9ad8bbe07
4 changed files with 301 additions and 161 deletions

View File

@@ -14,10 +14,8 @@ async fn start_app() {
let addr = SocketAddr::from(([0, 0, 0, 0], 8080));
info!("Start webserver...");
axum::Server::bind(&addr)
.serve(app.into_make_service())
.await
.unwrap();
let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
axum::serve(listener, app).await.unwrap();
info!("Webserver shutdown...")
}

View File

@@ -19,7 +19,7 @@ pub mod users;
pub type Database = Extension<Arc<PrismaClient>>;
async fn auth<B>(req: Request<B>, next: Next<B>) -> Result<Response, StatusCode> {
async fn auth(req: Request<axum::body::Body>, next: Next) -> Result<Response, StatusCode> {
let auth_header = req
.headers()
.get(http::header::AUTHORIZATION)