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 serde::Deserialize;
|
||||
|
||||
pub(crate) fn routes() -> Vec<rocket::Route> {
|
||||
routes![login]
|
||||
}
|
||||
|
||||
#[derive(Deserialize)]
|
||||
struct Credentials {
|
||||
username: String,
|
||||
|
|
|
@ -36,4 +36,5 @@ fn rocket() -> _ {
|
|||
"Run database migrations",
|
||||
run_db_migrations,
|
||||
))
|
||||
.mount("/auth", auth::routes())
|
||||
}
|
||||
|
|
Reference in New Issue