diff options
author | Teddy Wing | 2018-11-13 22:10:13 +0100 |
---|---|---|
committer | Teddy Wing | 2018-11-13 22:10:13 +0100 |
commit | d55de8c8cd746a7d5c537c3b2ca49994d3007b66 (patch) | |
tree | f3e223103684a088d1e288cbced8677337542ea2 /license-generator/src/response.rs | |
parent | a1184f48a0a4930f3e378860ba212051516b8717 (diff) | |
download | dome-key-web-d55de8c8cd746a7d5c537c3b2ca49994d3007b66.tar.bz2 |
Add 400 error page
HTML copied from the 404 page, but I remove the `text-center` on the
error message because it doesn't look good. Took a multiline message for
me to realise it.
Diffstat (limited to 'license-generator/src/response.rs')
-rw-r--r-- | license-generator/src/response.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/license-generator/src/response.rs b/license-generator/src/response.rs index cf91e4e..6809988 100644 --- a/license-generator/src/response.rs +++ b/license-generator/src/response.rs @@ -2,6 +2,10 @@ use std::io::Write; use errors::*; +pub fn set_400<W: Write>(w: &mut W) -> Result<()> { + Ok(writeln!(w, "Status: 400")?) +} + pub fn set_403<W: Write>(w: &mut W) -> Result<()> { Ok(writeln!(w, "Status: 403")?) } |