start working on auth
This commit is contained in:
@ -1,14 +1,21 @@
|
||||
use rocket::{get, routes, Build, Rocket};
|
||||
use rocket_dyn_templates::Template;
|
||||
use rocket_dyn_templates::{context, Template};
|
||||
use sqlx::SqlitePool;
|
||||
|
||||
use crate::model::user::Users;
|
||||
|
||||
mod auth;
|
||||
|
||||
#[get("/")]
|
||||
fn index() -> &'static str {
|
||||
"Hello, world!"
|
||||
fn index() -> Template {
|
||||
Template::render("index", context! {})
|
||||
}
|
||||
|
||||
pub fn start() -> Rocket<Build> {
|
||||
pub fn start(db: SqlitePool) -> Rocket<Build> {
|
||||
rocket::build()
|
||||
.manage(db)
|
||||
.mount("/", routes![index])
|
||||
.mount("/auth", auth::routes())
|
||||
.attach(Template::fairing())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user