Adding constant file
Rust Build / Check (pull_request) Successful in 31s
Rust Build / Rustfmt (pull_request) Successful in 31s
Rust Build / Test Suite (pull_request) Successful in 1m19s
Rust Build / Clippy (pull_request) Successful in 1m14s
Rust Build / build (pull_request) Successful in 1m48s

This commit is contained in:
2026-06-11 13:49:58 -04:00
parent 3c03e553c4
commit ebe53f51c9
3 changed files with 5 additions and 1 deletions
+1
View File
@@ -0,0 +1 @@
pub const SUCCESSFUL_MESSAGE: &str = "Successful";
+1
View File
@@ -1,5 +1,6 @@
pub mod common;
pub mod login;
pub mod messages;
pub mod register;
pub mod endpoints {
+3 -1
View File
@@ -237,8 +237,10 @@ pub async fn register_service_user(
match repo::service::insert(&pool, &service_user).await {
Ok(created) => {
resp.message = String::from(super::messages::SUCCESSFUL_MESSAGE);
service_user.created = Some(created);
(axum::http::StatusCode::NOT_IMPLEMENTED, axum::Json(resp))
resp.data.push(service_user);
(axum::http::StatusCode::CREATED, axum::Json(resp))
}
Err(err) => {
resp.message = err.to_string();