Register service user endpoint #5
@@ -229,10 +229,7 @@ pub async fn register_service_user(
|
||||
Err(err) => {
|
||||
eprintln!("Error: {err:?}");
|
||||
resp.message = String::from("Registration check failed");
|
||||
return (
|
||||
axum::http::StatusCode::INTERNAL_SERVER_ERROR,
|
||||
Json(resp)
|
||||
);
|
||||
return (axum::http::StatusCode::INTERNAL_SERVER_ERROR, Json(resp));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -290,10 +287,7 @@ pub async fn register_service_user(
|
||||
}
|
||||
} else {
|
||||
resp.message = String::from("Registration is not enabled");
|
||||
(
|
||||
axum::http::StatusCode::NOT_ACCEPTABLE,
|
||||
Json(resp),
|
||||
)
|
||||
(axum::http::StatusCode::NOT_ACCEPTABLE, Json(resp))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user