Skip to content

Commit

Permalink
fix #38
Browse files Browse the repository at this point in the history
  • Loading branch information
freedit-dev authored and HookedBehemoth committed Jul 30, 2024
1 parent 5d145da commit b763a0f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ fn main() {
rouille::start_server(list_address, move |request| {
let path = request.url();
let response = match path.as_str() {
"/" | "/world" => render_section(&client, "/world/", 0, 8),
"/" | "/home" | "/world/" => {
let offset = request
.get_param("offset")
.map_or(0, |s| s.parse::<u32>().unwrap_or(0));
render_section(&client, "/world/", offset, 8)
}
"/about" => render_about(),
"/search" | "/search/" => render_search(&client, request),
"/main.css" => {
Expand Down

0 comments on commit b763a0f

Please sign in to comment.