Fixing service registration that has no id
This commit is contained in:
@@ -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))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user