aboutsummaryrefslogtreecommitdiff
path: root/src/api/mod.rs
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2018-02-23 00:38:54 +0100
committerDaniel García <[email protected]>2018-02-23 00:38:54 +0100
commitdfefbf1f313ceaad3fbbec2d4c220ee37722081e (patch)
treec79cc1f5a4edffabd4c7141175fe2e5794b434d4 /src/api/mod.rs
parentc8b45f5fe5284965a25894d1c7d9427988883b53 (diff)
downloadvaultwarden-dfefbf1f313ceaad3fbbec2d4c220ee37722081e.tar.gz
vaultwarden-dfefbf1f313ceaad3fbbec2d4c220ee37722081e.zip
Fixed cipher import, created missing data structs instead of using generic Value, and fixed some warnings
Diffstat (limited to 'src/api/mod.rs')
-rw-r--r--src/api/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/api/mod.rs b/src/api/mod.rs
index db33fced..09d7265b 100644
--- a/src/api/mod.rs
+++ b/src/api/mod.rs
@@ -11,5 +11,13 @@ pub use self::web::routes as web_routes;
use rocket::response::status::BadRequest;
use rocket_contrib::Json;
+// Type aliases for API methods results
type JsonResult = Result<Json, BadRequest<Json>>;
type EmptyResult = Result<(), BadRequest<Json>>;
+
+// Common structs representing JSON data received
+#[derive(Deserialize)]
+#[allow(non_snake_case)]
+struct PasswordData {
+ masterPasswordHash: String
+}