From 730cf6c7380eebfe2bc481295a12dc2eb4def3b2 Mon Sep 17 00:00:00 2001 From: Michael Dong Date: Wed, 11 Feb 2026 13:27:43 +0800 Subject: [PATCH] Fix register endpoint to accept camelCase JSON fields Frontend sends inviteCode but backend expected invite_code, causing deserialization error on registration. Co-Authored-By: Claude Opus 4.6 --- backend_rust/src/api/auth.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/backend_rust/src/api/auth.rs b/backend_rust/src/api/auth.rs index 535d1bc..461b0c3 100644 --- a/backend_rust/src/api/auth.rs +++ b/backend_rust/src/api/auth.rs @@ -9,6 +9,7 @@ use crate::error::ApiError; use crate::middleware::auth::create_token; #[derive(Debug, Deserialize)] +#[serde(rename_all = "camelCase")] pub struct RegisterRequest { pub username: String, pub password: String,