diff --git a/src/rbs/auth.rs b/src/rbs/auth.rs index 9489933..0de053a 100644 --- a/src/rbs/auth.rs +++ b/src/rbs/auth.rs @@ -3,6 +3,10 @@ use rb::auth::{verify_user, JWTResponse, generate_jwt_token}; use rocket::serde::json::Json; use serde::Deserialize; +pub(crate) fn routes() -> Vec { + routes![login] +} + #[derive(Deserialize)] struct Credentials { username: String, diff --git a/src/rbs/main.rs b/src/rbs/main.rs index 5921df7..0acc0a7 100644 --- a/src/rbs/main.rs +++ b/src/rbs/main.rs @@ -36,4 +36,5 @@ fn rocket() -> _ { "Run database migrations", run_db_migrations, )) + .mount("/auth", auth::routes()) }