diff options
author | metamuffin <metamuffin@disroot.org> | 2024-04-15 16:32:27 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-04-15 16:32:27 +0200 |
commit | 2c1b50a1f32c5f87489c2bc03f81e53da8cf3d29 (patch) | |
tree | f626db01a3e025b6402c9c47cec53bfc6b47d87c /server/src | |
parent | e38c599bcfe0c052881b78bc141e9f54c75290ea (diff) | |
download | jellything-2c1b50a1f32c5f87489c2bc03f81e53da8cf3d29.tar jellything-2c1b50a1f32c5f87489c2bc03f81e53da8cf3d29.tar.bz2 jellything-2c1b50a1f32c5f87489c2bc03f81e53da8cf3d29.tar.zst |
make search work
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/routes/ui/search.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/server/src/routes/ui/search.rs b/server/src/routes/ui/search.rs index f87a13b..4ea5716 100644 --- a/server/src/routes/ui/search.rs +++ b/server/src/routes/ui/search.rs @@ -64,6 +64,7 @@ pub async fn r_search<'a>( None }; let search_dur = timing.elapsed(); + let query = query.unwrap_or_default().to_string(); Ok(LayoutPage { title: "Search".to_string(), @@ -71,7 +72,7 @@ pub async fn r_search<'a>( content: markup::new! { h1 { "Search" } form[action="", method="GET"] { - input[type="text", name="query", placeholder="Search Term"]; + input[type="text", name="query", placeholder="Search Term", value=&query]; input[type="submit", value="Search"]; } @if let Some((count, results)) = &results { |