rust fmt and some cleaning
Some checks failed
Deploy API / build-and-deploy (push) Failing after 5s

This commit is contained in:
2026-03-11 14:22:46 +01:00
parent 1de40ec705
commit e5a1d36654
36 changed files with 1107 additions and 1199 deletions

View File

@@ -1,9 +1,8 @@
use axum::{
extract::{Request, FromRequest, Path},
body::{Body},
http::StatusCode,
Json, Router,
body::Body,
extract::{FromRequest, Path, Request},
http::StatusCode,
};
use serde::Deserialize;
@@ -16,7 +15,8 @@ pub struct UpdateRoomPayload(pub UpdateRoomValues);
//#[async_trait]
impl<S> FromRequest<S> for UpdateRoomPayload
where S: Send + Sync,
where
S: Send + Sync,
{
type Rejection = (StatusCode, String);
@@ -24,14 +24,14 @@ where S: Send + Sync,
let Json(payload) = Json::<UpdateRoomValues>::from_request(req, state)
.await
.map_err(|err| (StatusCode::BAD_REQUEST, format!("Invalid body: {}", err)))?;
Ok(UpdateRoomPayload(payload))
}
}
#[derive(Debug)]
pub struct RoomIdValue {
pub room_id: i32
pub room_id: i32,
}
pub type RoomIdPath = Path<i32>;
pub type RoomIdPath = Path<i32>;