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 <noreply@anthropic.com>
This commit is contained in:
Michael Dong
2026-02-11 13:27:43 +08:00
parent 4ea0f163c3
commit 730cf6c738

View File

@@ -9,6 +9,7 @@ use crate::error::ApiError;
use crate::middleware::auth::create_token; use crate::middleware::auth::create_token;
#[derive(Debug, Deserialize)] #[derive(Debug, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RegisterRequest { pub struct RegisterRequest {
pub username: String, pub username: String,
pub password: String, pub password: String,