aboutsummaryrefslogtreecommitdiff
path: root/src/routes/not_understood.rs
diff options
context:
space:
mode:
authorKevin J Hoerr <kjhoerr@submelon.tech>2019-10-30 14:36:53 -0400
committerKevin J Hoerr <kjhoerr@submelon.tech>2019-10-30 14:36:53 -0400
commit6fa8950cf867a8e1246c2f2c90a4047ae5175f6f (patch)
treeb5a538ceff7d66c4f98417394db3eecc242b5ffb /src/routes/not_understood.rs
parent82c3cc2c1952020ef13c330047cbc8ba1dc7cc75 (diff)
downloadaugust-offensive-6fa8950cf867a8e1246c2f2c90a4047ae5175f6f.tar.gz
august-offensive-6fa8950cf867a8e1246c2f2c90a4047ae5175f6f.tar.bz2
august-offensive-6fa8950cf867a8e1246c2f2c90a4047ae5175f6f.zip
Replace Json handler with handler for status codes
Diffstat (limited to 'src/routes/not_understood.rs')
-rw-r--r--src/routes/not_understood.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/routes/not_understood.rs b/src/routes/not_understood.rs
index c94e6e2..4e30361 100644
--- a/src/routes/not_understood.rs
+++ b/src/routes/not_understood.rs
@@ -6,7 +6,10 @@ pub fn not_understood(req: HttpRequest) -> JsonMessage<NotUnderstood> {
path: destruct_path(req.path()),
};
- Ok(Json(message.as_outgoing()))
+ Ok(FormatMsg {
+ message: message.as_outgoing(),
+ code: StatusCode::NOT_FOUND,
+ })
}
#[cfg(test)]