Update deps

This commit is contained in:
2023-12-10 22:24:46 +01:00
parent 1cada2b695
commit a6f5a5be95
4 changed files with 316 additions and 176 deletions

View File

@@ -32,9 +32,7 @@ async fn main() {
let app = get_router().await;
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

@@ -28,7 +28,7 @@ pub mod translators;
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)