Mounted auth routes
parent
9309ec77fb
commit
ac762a3c31
|
@ -3,6 +3,10 @@ use rb::auth::{verify_user, JWTResponse, generate_jwt_token};
|
||||||
use rocket::serde::json::Json;
|
use rocket::serde::json::Json;
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
|
||||||
|
pub(crate) fn routes() -> Vec<rocket::Route> {
|
||||||
|
routes![login]
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
struct Credentials {
|
struct Credentials {
|
||||||
username: String,
|
username: String,
|
||||||
|
|
|
@ -36,4 +36,5 @@ fn rocket() -> _ {
|
||||||
"Run database migrations",
|
"Run database migrations",
|
||||||
run_db_migrations,
|
run_db_migrations,
|
||||||
))
|
))
|
||||||
|
.mount("/auth", auth::routes())
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue