mirror of
https://github.com/fluencelabs/fluid
synced 2025-07-31 04:01:56 +00:00
step1 script
This commit is contained in:
@@ -7,7 +7,7 @@ pub type AppResult<T> = ::std::result::Result<T, Box<Error>>;
|
||||
#[derive(Deserialize)]
|
||||
#[serde(tag = "action")]
|
||||
pub enum Request {
|
||||
Post { msg: String, handle: String },
|
||||
Post { message: String, handle: String },
|
||||
Fetch { handle: Option<String> },
|
||||
}
|
||||
|
||||
|
@@ -22,7 +22,7 @@ fn init() {
|
||||
fn run(arg: String) -> String {
|
||||
// Parse and handle JSON request
|
||||
let result = api::parse(arg).and_then(|request| match request {
|
||||
Request::Post { msg, handle } => add_post(msg, handle),
|
||||
Request::Post { message, handle } => add_post(message, handle),
|
||||
Request::Fetch { handle } => fetch_posts(handle),
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user