diff --git a/src/main.rs b/src/main.rs index 83e7829..c4ba40e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,5 @@ use rocket::fairing::AdHoc; +use rocket::fs::FileServer; use rocket::http::Status; use rocket::response::content::{self, RawHtml}; use rocket::{Build, Request, Rocket}; @@ -15,29 +16,18 @@ use rocket_db_pools::{ }; use rocket::serde::{json::Json, Deserialize}; -use rocket::{ - fs::FileServer, - http::CookieJar, - tokio::time::{sleep, Duration}, -}; +use rocket::http::CookieJar; use fossil::tables::{Db, Post, User}; -#[get("/")] -fn hello() -> RawHtml { - content::RawHtml(fs::read_to_string("/srv/web/index.html").unwrap()) - // format!("hi!!!") +#[get("/login")] +fn login_page() -> RawHtml { + content::RawHtml(fs::read_to_string("/srv/web/login.html").unwrap()) } -#[get("/book//")] -fn get_book(card: String, isbn: String) -> String { - format!("You're checking out the book {isbn}, with the account {card}.") -} - -#[get("/delay/