Register endpoint #16

Merged
phoenix merged 56 commits from register_endpoint-init into devel 2025-04-05 19:26:59 +00:00
Showing only changes of commit 550947f051 - Show all commits

View File

@@ -31,7 +31,7 @@ pub mod response {
#[derive(Deserialize, Serialize)]
pub struct Response {
pub message: String,
pub data: models::common::User,
pub data: Vec<models::common::User>,
}
}
@@ -52,7 +52,7 @@ pub async fn register_user(
StatusCode::CREATED,
Json(response::Response {
message: String::from("User inserted"),
data: user,
data: vec![user],
}),
)
}
@@ -60,7 +60,7 @@ pub async fn register_user(
StatusCode::BAD_REQUEST,
Json(response::Response {
message: err.to_string(),
data: user,
data: vec![user],
}),
),
}