Adding endpoint constant and making endpoint available
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user