aboutsummaryrefslogtreecommitdiff
path: root/lockchain-http/src/lib.rs
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2018-06-10 20:32:38 +0200
committerKatharina Fey <kookie@spacekookie.de>2018-06-10 20:32:38 +0200
commit28b2a6b9eda45946ffd52020ed4f772ad18b9616 (patch)
tree2e9e7194d035efe3fc4ee0b6fe1532b1b07f9473 /lockchain-http/src/lib.rs
parent9a30f0d6036dd8c15cffce11830180fb02529887 (diff)
Removing User & Login traits from core, adding a metadata store to take their place
Diffstat (limited to 'lockchain-http/src/lib.rs')
-rw-r--r--lockchain-http/src/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/lockchain-http/src/lib.rs b/lockchain-http/src/lib.rs
index 5192de2..a3872e1 100644
--- a/lockchain-http/src/lib.rs
+++ b/lockchain-http/src/lib.rs
@@ -10,6 +10,9 @@
//!
//! Ideally this shim-layer version should be the same as the `lockchain-core` it binds
//! against, however especially during development this won't always be the case.
+//!
+//! **Note**: API endpoint documentation can be found
+//! [here](https://github.com/spacekookie/lockchain/tree/master/lockchain-http#api-reference)
#[macro_use]
extern crate serde_derive;
@@ -23,7 +26,7 @@ mod handlers;
mod model;
pub use model::CarrierMessage;
-use actix_web::{server, App};
+use actix_web::{http, server, App};
use lockchain::traits::{Body, Vault};
use std::sync::{Arc, Mutex};
@@ -58,7 +61,9 @@ pub fn create_server<B: Body + 'static>(
server::new(move || {
vec![
App::with_state(Arc::clone(&state))
- .resource("/vault", |r| r.f(handlers::create_vault))
+ .resource("/vault", |r| {
+ r.method(http::Method::PUT).with(handlers::create_vault)
+ })
.resource("/vault/{vaultid}", |r| r.f(handlers::update_vault))
.resource("/vault/{vaultid}", |r| r.f(handlers::delete_vault))
.resource("/vault/{vaultid}/records/{recordid}", |r| {