diff options
author | Martin Fischer <martin@push-f.com> | 2021-06-24 08:14:39 +0200 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-06-24 08:14:39 +0200 |
commit | afd6c8c083bcc11523cd4143e408e0831613fed9 (patch) | |
tree | 61c98e1d85b2f517f0f0a063a3523107926ecfb4 /src/main.rs | |
parent | b3e7c889b40a64db20bc52e579938d9c57f1bc3a (diff) |
split off diff action from log action
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index fc0b7ce..658a245 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,6 +21,7 @@ use serde::Deserialize; use sputnik::html_escape; use sputnik::hyper_body::FormError; use sputnik::mime; +use sputnik::request::QueryError; use sputnik::request::SputnikParts; use sputnik::response::SputnikBuilder; use std::convert::Infallible; @@ -496,6 +497,12 @@ impl From<FormError> for Error { } } +impl From<QueryError> for Error { + fn from(e: QueryError) -> Self { + Self::BadRequest(e.to_string()) + } +} + pub struct Context { repo: Repository, parts: Parts, |