Mounted auth routes

develop
Jef Roosens 2021-08-21 17:03:10 +02:00
parent 9309ec77fb
commit ac762a3c31
Signed by untrusted user: Jef Roosens
GPG Key ID: 955C0660072F691F
2 changed files with 5 additions and 0 deletions

View File

@ -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,

View File

@ -36,4 +36,5 @@ fn rocket() -> _ {
"Run database migrations",
run_db_migrations,
))
.mount("/auth", auth::routes())
}