Page MenuHomeDevCentral

D1882.id4753.diff
No OneTemporary

D1882.id4753.diff

diff --git a/Cargo.toml b/Cargo.toml
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "limiting-factor"
-version = "0.3.0"
+version = "0.4.0"
authors = [
"Sébastien Santoro <dereckson@espace-win.org>",
]
diff --git a/src/api/replies.rs b/src/api/replies.rs
--- a/src/api/replies.rs
+++ b/src/api/replies.rs
@@ -135,6 +135,14 @@
Helper methods to prepare API responses
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
+pub fn build_not_found_response() -> Failure {
+ Failure::from(Status::NotFound)
+}
+
+pub fn build_bad_request_response() -> Failure {
+ Failure::from(Status::BadRequest)
+}
+
pub fn build_internal_server_error_response(message: &str) -> Failure {
warn!(target:"api", "{}", message);

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 24, 06:02 (15 h, 26 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2374173
Default Alt Text
D1882.id4753.diff (776 B)

Event Timeline