aboutsummaryrefslogtreecommitdiff
path: root/src/modules/router/module.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-04-06 01:53:22 -0700
committerFuwn <[email protected]>2023-04-06 01:53:22 -0700
commit9235be2eedc2c4f3a78cb704b0a107f33607e530 (patch)
treefc927ec6d5a58d2e995cf6ff80ae2804a2265531 /src/modules/router/module.rs
parentdeps(windmark): bump 0.2.5 -> 0.3.1 (diff)
downloadlocus-9235be2eedc2c4f3a78cb704b0a107f33607e530.tar.xz
locus-9235be2eedc2c4f3a78cb704b0a107f33607e530.zip
feat: native async reqwest calls
Diffstat (limited to 'src/modules/router/module.rs')
-rw-r--r--src/modules/router/module.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/modules/router/module.rs b/src/modules/router/module.rs
index 34d20db..cd7c862 100644
--- a/src/modules/router/module.rs
+++ b/src/modules/router/module.rs
@@ -19,25 +19,25 @@
use windmark::context::HookContext;
pub fn module(router: &mut windmark::Router) {
- router.set_pre_route_callback(move |context: HookContext<'_>| {
+ router.set_pre_route_callback(move |context: HookContext| {
info!(
"accepted connection from {} to {}",
- context.tcp.peer_addr().unwrap().ip(),
+ context.peer_address.unwrap().ip(),
context.url.to_string(),
);
super::ticker::module(&context);
});
router.set_post_route_callback({
- |context: HookContext<'_>, response: &mut windmark::Response| {
+ |context: HookContext, response: &mut windmark::Response| {
info!(
"closed connection from {} to {}",
- context.tcp.peer_addr().unwrap().ip(),
+ context.peer_address.unwrap().ip(),
context.url.to_string(),
);
if let Some(language) =
- windmark::utilities::queries_from_url(context.url).get("translate")
+ windmark::utilities::queries_from_url(&context.url).get("translate")
{
if super::translate::module(&context, response, language).is_err() {
response.content = format!(