Adding endpoint constant and making endpoint available

This commit is contained in:
2026-06-11 13:02:06 -04:00
parent a94f949ba4
commit 4e8c4125fe
2 changed files with 6 additions and 0 deletions
+2
View File
@@ -8,4 +8,6 @@ pub mod endpoints {
/// Endpoint for a user to login
pub const LOGIN: &str = "/api/v1/login";
pub const DBTEST: &str = "/api/v1/test/db";
/// Endpoint constant for service user registration
pub const REGISTER_SERVICE_USER: &str = "/api/v1/service/register";
}
+4
View File
@@ -97,6 +97,10 @@ pub mod init {
callers::endpoints::REGISTER,
post(callers::register::register_user),
)
.route(
callers::endpoints::REGISTER_SERVICE_USER,
post(callers::register::register_service_user),
)
.route(callers::endpoints::LOGIN, post(callers::login::user_login))
.layer(cors::configure_cors().await)
}