From f912844aa967db9bd80be1f144a7d6b411c9bfcf Mon Sep 17 00:00:00 2001 From: phoenix Date: Mon, 20 Oct 2025 11:23:37 -0400 Subject: [PATCH] tsk-55: Fixing issue with register endpoint --- src/callers/register.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/callers/register.rs b/src/callers/register.rs index bd8711f..565234b 100644 --- a/src/callers/register.rs +++ b/src/callers/register.rs @@ -52,6 +52,7 @@ pub async fn register_user( axum::Extension(pool): axum::Extension, Json(payload): Json, ) -> (StatusCode, Json) { + // TODO: Some cleanup here let mut user = icarus_models::user::User { id: uuid::Uuid::nil(), username: payload.username.clone(), @@ -71,10 +72,10 @@ pub async fn register_user( Ok(res) => { if res { ( - StatusCode::NOT_FOUND, + StatusCode::BAD_REQUEST, Json(response::Response { message: String::from("Error"), - data: vec![user], + data: Vec::new(), }), ) } else {