Fix redirect to 404 on /node/ URLs
This commit is contained in:
parent
3f9d3aeae6
commit
2eb7380212
1 changed files with 1 additions and 1 deletions
|
|
@ -10,7 +10,7 @@ pub async fn node(Path(id): Path<String>) -> Response<Body> {
|
|||
let empty_node = Node::new(Some(format!("Could not find node ID {id}.")));
|
||||
let node = graph.find_node(&id).unwrap_or(empty_node.clone());
|
||||
|
||||
if !graph.nodes.contains_key(&id) {
|
||||
if !graph.nodes.contains_key(&id) && graph.lowercase_keymap.contains_key(&id) {
|
||||
return Redirect::permanent(format!("/node/{}", node.id).as_str())
|
||||
.into_response();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue