Fixing service registration that has no id

This commit is contained in:
2026-06-11 16:27:44 -04:00
parent 5e1d70128b
commit be6b933765
2 changed files with 6 additions and 4 deletions
+2 -1
View File
@@ -261,9 +261,10 @@ pub async fn register_service_user(
println!("Creating user");
match repo::service::insert(&pool, &service_user).await {
Ok(created) => {
Ok((service_user_id, created)) => {
resp.message = String::from(super::messages::SUCCESSFUL_MESSAGE);
service_user.created = Some(created);
service_user.id = service_user_id;
resp.data.push(service_user);
(axum::http::StatusCode::CREATED, axum::Json(resp))
}