Skip to content

Commit

Permalink
fix: fix for served paths in new aw-webui build config (no more /stat…
Browse files Browse the repository at this point in the history
…ic/)
  • Loading branch information
ErikBjare committed May 6, 2024
1 parent 75ca368 commit f1f63c3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions aw-server/src/endpoints/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,21 @@ fn root_favicon(state: &State<ServerState>) -> Option<(ContentType, Vec<u8>)> {
get_file("favicon.ico".into(), state)
}

#[get("/dark.css")]
fn root_dark(state: &State<ServerState>) -> Option<(ContentType, Vec<u8>)> {
get_file("dark.css".into(), state)
}

#[get("/logo.png")]
fn root_logo(state: &State<ServerState>) -> Option<(ContentType, Vec<u8>)> {
get_file("logo.png".into(), state)
}

#[get("/manifest.json")]
fn root_manifest(state: &State<ServerState>) -> Option<(ContentType, Vec<u8>)> {
get_file("manifest.json".into(), state)
}

#[get("/")]
fn server_info(config: &State<AWConfig>, state: &State<ServerState>) -> Json<Info> {
#[allow(clippy::or_fun_call)]
Expand Down Expand Up @@ -136,6 +151,10 @@ pub fn build_rocket(server_state: ServerState, config: AWConfig) -> rocket::Rock
root_css,
root_js,
root_static,
// custom static files
root_dark,
root_logo,
root_manifest
],
)
.mount("/api/0/info", routes![server_info])
Expand Down

0 comments on commit f1f63c3

Please sign in to comment.