Updated bw_rs to Rocket version 0.4-rc1

This commit is contained in:
Daniel García
2018-10-10 20:40:39 +02:00
parent f1b1000600
commit c673370103
31 changed files with 716 additions and 1485 deletions

View File

@@ -12,11 +12,12 @@ pub use self::notifications::routes as notifications_routes;
pub use self::notifications::{start_notification_server, WebSocketUsers, UpdateType};
use rocket::response::status::BadRequest;
use rocket_contrib::Json;
use rocket_contrib::json::Json;
use serde_json::Value;
// Type aliases for API methods results
type ApiResult<T> = Result<T, BadRequest<Json>>;
type JsonResult = ApiResult<Json>;
type ApiResult<T> = Result<T, BadRequest<Json<Value>>>;
type JsonResult = ApiResult<Json<Value>>;
type EmptyResult = ApiResult<()>;
use util;