From f035474090d3c82f50c3860cbafd6f60b8af36e8 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 10 Feb 2026 01:11:36 +0100 Subject: fix index key ser; query debug print --- server/src/ui/home.rs | 21 +++++++++------------ server/src/ui/mod.rs | 2 +- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'server/src/ui') diff --git a/server/src/ui/home.rs b/server/src/ui/home.rs index 4e9fd28..e9136ec 100644 --- a/server/src/ui/home.rs +++ b/server/src/ui/home.rs @@ -5,18 +5,15 @@ */ use super::error::MyResult; -use rocket::{get, response::content::RawHtml, serde::json::Json, Either}; +use crate::request_info::RequestInfo; +use jellycommon::jellyobject::ObjectBuffer; +use jellyui::render_view; +use rocket::{Either, get, response::content::RawHtml, serde::json::Json}; #[get("/home")] -pub fn r_home(ri: RequestInfo) -> MyResult, Json>> { - let r = jellylogic::home::home(&ri.session)?; - - Ok(if matches!(ri.accept, Accept::Json) { - Either::Right(Json(r)) - } else { - Either::Left(RawHtml(render_page( - &HomePage { lang: &ri.lang, r }, - ri.render_info(), - ))) - }) +pub fn r_home(ri: RequestInfo<'_>) -> MyResult> { + Ok(RawHtml(render_view( + ri.render_info(), + ObjectBuffer::new(&mut []).as_object(), + ))) } diff --git a/server/src/ui/mod.rs b/server/src/ui/mod.rs index 55fad6a..112bb6b 100644 --- a/server/src/ui/mod.rs +++ b/server/src/ui/mod.rs @@ -14,7 +14,7 @@ pub mod account; // pub mod admin; pub mod assets; pub mod error; -// pub mod home; +pub mod home; // pub mod items; pub mod node; // pub mod player; -- cgit v1.3