diff options
| author | Fuwn <[email protected]> | 2023-05-17 02:12:20 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2023-05-17 02:12:20 -0700 |
| commit | 0bc4ac8ba3a16aed491c3260d51406685cde2408 (patch) | |
| tree | 164df292848c8ba9197ffb1607a7fa1ddcad37ed /src/response.rs | |
| parent | chore(tasks): simplify formatter (diff) | |
| download | locus-0bc4ac8ba3a16aed491c3260d51406685cde2408.tar.xz locus-0bc4ac8ba3a16aed491c3260d51406685cde2408.zip | |
deps(windmark): bump to 0.3.9
Diffstat (limited to 'src/response.rs')
| -rw-r--r-- | src/response.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/response.rs b/src/response.rs index a8f8848..b368ba1 100644 --- a/src/response.rs +++ b/src/response.rs @@ -17,6 +17,8 @@ use std::sync::LazyLock; +use windmark::response::Response; + static QUOTES: LazyLock<Vec<String>> = LazyLock::new(|| { serde_json::from_str(include_str!("../content/json/quotes.json")).unwrap() }); @@ -34,10 +36,10 @@ struct Main<'a> { pub fn success( body: &impl ToString, context: &windmark::context::RouteContext, -) -> windmark::Response { +) -> Response { crate::route::cache(context, &body.to_string()); - windmark::Response::success( + Response::success( Main { body: &body.to_string(), hits: &crate::route::hits_from(context.url.path()), |