aboutsummaryrefslogtreecommitdiff
path: root/server/src/request_info.rs
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2026-02-28 00:24:52 +0100
committermetamuffin <metamuffin@disroot.org>2026-02-28 00:24:52 +0100
commit4841c08da8afa3e42c354fbc325ce56b6f997079 (patch)
tree3574919fc3e631e76e9e8a136c692f2a614e80b2 /server/src/request_info.rs
parent7930d543a2aa68d4ad2958605827d7eb1baa91f8 (diff)
downloadjellything-4841c08da8afa3e42c354fbc325ce56b6f997079.tar
jellything-4841c08da8afa3e42c354fbc325ce56b6f997079.tar.bz2
jellything-4841c08da8afa3e42c354fbc325ce56b6f997079.tar.zst
bad pagination
Diffstat (limited to 'server/src/request_info.rs')
-rw-r--r--server/src/request_info.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/server/src/request_info.rs b/server/src/request_info.rs
index 0adfe96..55dde0d 100644
--- a/server/src/request_info.rs
+++ b/server/src/request_info.rs
@@ -26,6 +26,7 @@ pub struct RequestInfo<'a> {
pub debug: &'a str,
pub user: Option<Box<User>>,
pub state: Arc<State>,
+ pub no_scaffold: bool,
pub flash: Option<FlashMessage<'a>>,
}
@@ -48,6 +49,7 @@ impl<'a> RequestInfo<'a> {
accept: Accept::from_request_ut(request),
user: user_from_request(state, request)?,
state: state.clone(),
+ no_scaffold: request.query_value::<bool>("no_scaff").is_some(),
debug: request
.query_value::<&str>("debug")
.transpose()
@@ -78,7 +80,11 @@ impl<'a> RequestInfo<'a> {
}
}
pub fn respond_ui(&self, page: &dyn Page) -> RawHtml<String> {
- RawHtml(Scaffold { page }.to_string())
+ if self.no_scaffold {
+ RawHtml(page.render().to_string())
+ } else {
+ RawHtml(Scaffold { page }.to_string())
+ }
}
}