You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
371 B
Rust
18 lines
371 B
Rust
use rocket::{http::Status, State};
|
|
|
|
use crate::db::DB;
|
|
use crate::ui::layouts::index::Index;
|
|
use crate::util::render_bare;
|
|
|
|
#[get("/")]
|
|
pub async fn site_index(db : &State<DB>) -> Result<String, (Status, String)> {
|
|
let site = db.get_site_data().await.unwrap();
|
|
|
|
let response = render_bare(leptos::view! {
|
|
<Index site={site}/>
|
|
});
|
|
|
|
Ok(response)
|
|
}
|
|
|