wip
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
use rocket::get;
|
||||
use rocket::{get, State, config};
|
||||
use rocket_dyn_templates::Template;
|
||||
use serde::Serialize;
|
||||
|
||||
#[derive(Serialize, Debug)]
|
||||
struct Test {
|
||||
use crate::PresentationConfig;
|
||||
|
||||
#[derive(Serialize, Debug)]
|
||||
struct RootPage {
|
||||
static_host: String,
|
||||
}
|
||||
|
||||
#[get("/")]
|
||||
pub fn index() -> Template {
|
||||
let context = Test {};
|
||||
pub fn index(config: &State<PresentationConfig>) -> Template {
|
||||
let context = RootPage {
|
||||
static_host: config.static_route.clone(),
|
||||
};
|
||||
Template::render("default", &context)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user