mirror of
https://codeberg.org/slatian/service.echoip-slatecave.git
synced 2024-11-10 00:27:21 +01:00
Adapted to the new syncronous interface of the HumusEngine
This commit is contained in:
parent
0076db531a
commit
636e10f786
20
src/main.rs
20
src/main.rs
@ -369,7 +369,7 @@ async fn not_found_handler(
|
||||
state.templating_engine.render_view(
|
||||
&settings,
|
||||
View::NotFound,
|
||||
).await
|
||||
)
|
||||
}
|
||||
|
||||
async fn hello_world_handler(
|
||||
@ -382,9 +382,9 @@ async fn hello_world_handler(
|
||||
&settings,
|
||||
View::Message{
|
||||
title: "Hey There!".to_string(),
|
||||
message: "You,You are an awesome Creature!".to_string()
|
||||
message: "You are an awesome Creature!".to_string()
|
||||
},
|
||||
).await
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -428,7 +428,7 @@ async fn handle_default_route(
|
||||
result: result,
|
||||
user_agent: user_agent,
|
||||
}
|
||||
).await
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -455,7 +455,7 @@ async fn handle_search_request(
|
||||
return state.templating_engine.render_view(
|
||||
&settings,
|
||||
View::Asn{asn: asn},
|
||||
).await
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -494,7 +494,7 @@ async fn handle_dns_resolver_route(
|
||||
state.templating_engine.render_view(
|
||||
&settings,
|
||||
View::DnsResolverList,
|
||||
).await
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -508,12 +508,12 @@ async fn handle_dns_resolver_route_with_path(
|
||||
state.templating_engine.render_view(
|
||||
&settings,
|
||||
View::DnsResolver{ config: resolver.clone() },
|
||||
).await
|
||||
)
|
||||
} else {
|
||||
state.templating_engine.render_view(
|
||||
&settings,
|
||||
View::NotFound,
|
||||
).await
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -545,7 +545,7 @@ async fn handle_ip_request(
|
||||
state.templating_engine.render_view(
|
||||
&settings,
|
||||
View::Ip{result: result}
|
||||
).await
|
||||
)
|
||||
}
|
||||
|
||||
async fn get_ip_result(
|
||||
@ -634,7 +634,7 @@ async fn handle_dig_request(
|
||||
state.templating_engine.render_view(
|
||||
&settings,
|
||||
View::Dig{ query: dig_query, result: dig_result}
|
||||
).await
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user