removes ApiResponse from server

This commit is contained in:
2019-10-16 22:32:58 +02:00
parent 8cfa21eccf
commit 2222422f8a

View File

@@ -11,23 +11,6 @@ use std::default;
type AppPool = web::Data<Pool>; type AppPool = web::Data<Pool>;
#[derive(Serialize, Deserialize, Debug)]
enum Update {
NoUpdate,
Wealth,
ItemAdded,
ItemRemoved,
ClaimAdded,
ClaimRemoved,
}
#[derive(Serialize, Deserialize, Debug, Default)]
struct ApiResponse<T> {
value: Option<T>, // The value requested, if any
notify: Option<String>, // A text to notify user, if relevant
updates: Option<Vec<Update>>, // A list of updates, if any
errors: Option<String>, // A text describing errors, if any
}
/// Wraps call to the DbApi and process its result as a async HttpResponse /// Wraps call to the DbApi and process its result as a async HttpResponse
/// ///
/// Provides a convenient way to call the api inside a route definition. Given a connection pool, /// Provides a convenient way to call the api inside a route definition. Given a connection pool,