♻️ refactor: ptth_relay: clean up Handlebars file names
parent
0ffa129937
commit
9a984f5a4e
|
@ -298,7 +298,7 @@ async fn handle_server_list (
|
||||||
{
|
{
|
||||||
let page = handle_server_list_internal (&state).await;
|
let page = handle_server_list_internal (&state).await;
|
||||||
|
|
||||||
let s = handlebars.render ("relay_server_list", &page)?;
|
let s = handlebars.render ("server_list", &page)?;
|
||||||
Ok (ok_reply (s)?)
|
Ok (ok_reply (s)?)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -358,7 +358,7 @@ async fn handle_all (
|
||||||
Ok (error_reply (StatusCode::NOT_IMPLEMENTED, "Not implemented (yet)")?)
|
Ok (error_reply (StatusCode::NOT_IMPLEMENTED, "Not implemented (yet)")?)
|
||||||
}
|
}
|
||||||
else if path == "/" {
|
else if path == "/" {
|
||||||
let s = handlebars.render ("relay_root", &())?;
|
let s = handlebars.render ("root", &())?;
|
||||||
Ok (ok_reply (s)?)
|
Ok (ok_reply (s)?)
|
||||||
}
|
}
|
||||||
else if path == "/frontend/relay_up_check" {
|
else if path == "/frontend/relay_up_check" {
|
||||||
|
@ -384,8 +384,8 @@ pub fn load_templates (asset_root: &Path)
|
||||||
let asset_root = asset_root.join ("handlebars/relay");
|
let asset_root = asset_root.join ("handlebars/relay");
|
||||||
|
|
||||||
for (k, v) in &[
|
for (k, v) in &[
|
||||||
("relay_server_list", "relay_server_list.html"),
|
("server_list", "server_list.hbs"),
|
||||||
("relay_root", "relay_root.html"),
|
("root", "root.hbs"),
|
||||||
] {
|
] {
|
||||||
handlebars.register_template_file (k, &asset_root.join (v))?;
|
handlebars.register_template_file (k, &asset_root.join (v))?;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue