fix(room): accept room_public JSON key for HTTP fallback
The frontend WebSocket client sends room_public, but the HTTP fallback sends it as a JSON body parsed directly into RoomCreateRequest/RoomUpdateRequest which expects public. Add #[serde(rename = "room_public")] so both ws params and HTTP JSON body work consistently.
This commit is contained in:
parent
8b433c9169
commit
df87a65cbb
@ -113,6 +113,7 @@ pub struct RoomCategoryResponse {
|
|||||||
#[derive(Debug, Clone, Deserialize, Serialize, utoipa::ToSchema)]
|
#[derive(Debug, Clone, Deserialize, Serialize, utoipa::ToSchema)]
|
||||||
pub struct RoomCreateRequest {
|
pub struct RoomCreateRequest {
|
||||||
pub room_name: String,
|
pub room_name: String,
|
||||||
|
#[serde(rename = "room_public")]
|
||||||
pub public: bool,
|
pub public: bool,
|
||||||
pub category: Option<Uuid>,
|
pub category: Option<Uuid>,
|
||||||
}
|
}
|
||||||
@ -120,6 +121,7 @@ pub struct RoomCreateRequest {
|
|||||||
#[derive(Debug, Clone, Deserialize, Serialize, utoipa::ToSchema)]
|
#[derive(Debug, Clone, Deserialize, Serialize, utoipa::ToSchema)]
|
||||||
pub struct RoomUpdateRequest {
|
pub struct RoomUpdateRequest {
|
||||||
pub room_name: Option<String>,
|
pub room_name: Option<String>,
|
||||||
|
#[serde(rename = "room_public")]
|
||||||
pub public: Option<bool>,
|
pub public: Option<bool>,
|
||||||
pub category: Option<Uuid>,
|
pub category: Option<Uuid>,
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user