aboutsummaryrefslogtreecommitdiff
path: root/src/modules/web.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2023-05-17 02:12:20 -0700
committerFuwn <[email protected]>2023-05-17 02:12:20 -0700
commit0bc4ac8ba3a16aed491c3260d51406685cde2408 (patch)
tree164df292848c8ba9197ffb1607a7fa1ddcad37ed /src/modules/web.rs
parentchore(tasks): simplify formatter (diff)
downloadlocus-0bc4ac8ba3a16aed491c3260d51406685cde2408.tar.xz
locus-0bc4ac8ba3a16aed491c3260d51406685cde2408.zip
deps(windmark): bump to 0.3.9
Diffstat (limited to 'src/modules/web.rs')
-rw-r--r--src/modules/web.rs11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modules/web.rs b/src/modules/web.rs
index 09c6ac9..7551b2c 100644
--- a/src/modules/web.rs
+++ b/src/modules/web.rs
@@ -15,12 +15,11 @@
// Copyright (C) 2022-2023 Fuwn <[email protected]>
// SPDX-License-Identifier: GPL-3.0-only
+use windmark::response::Response;
+
use crate::{response::success, route::track_mount};
-fn error(
- message: &str,
- context: &windmark::context::RouteContext,
-) -> windmark::Response {
+fn error(message: &str, context: &windmark::context::RouteContext) -> Response {
success(
&format!(
"# World Wide Web to Gemini Gateway\n\n{message}\n\n=> /web Go back"
@@ -29,7 +28,7 @@ fn error(
)
}
-pub fn module(router: &mut windmark::Router) {
+pub fn module(router: &mut windmark::router::Router) {
track_mount(
router,
"/web",
@@ -52,7 +51,7 @@ To visit the web version of this exact page, <https://fuwn.me/web>, you would vi
"/web/*url",
"World Wide Web to Gemini Gateway Visitor",
async move |context| {
- windmark::Response::success({
+ Response::success({
let Ok(url) = url::Url::parse(&format!(
"https://{}",
if let Some(url_choice) = context.parameters.get("url") {