From 56a77f8bf35152dce09dc00a25749dcadf6a88ea Mon Sep 17 00:00:00 2001 From: ghassmo Date: Mon, 25 Oct 2021 17:50:48 +0300 Subject: [PATCH] darkfid: fix the json response's id --- src/bin/darkfid.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bin/darkfid.rs b/src/bin/darkfid.rs index 85251cbd3..d19efd112 100644 --- a/src/bin/darkfid.rs +++ b/src/bin/darkfid.rs @@ -188,7 +188,7 @@ impl Darkfid { } .await; match result { - Ok(res) => JsonResult::Resp(jsonresp(json!(res), json!(res))), + Ok(res) => JsonResult::Resp(jsonresp(json!(res), id)), Err(err) => JsonResult::Err(jsonerr(InternalError, Some(err.to_string()), json!(id))), } } @@ -244,7 +244,7 @@ impl Darkfid { .await; match result { - Ok(res) => JsonResult::Resp(jsonresp(json!(res), json!(res))), + Ok(res) => JsonResult::Resp(jsonresp(json!(res), id)), Err(err) => JsonResult::Err(jsonerr(InternalError, Some(err.to_string()), json!(id))), } } @@ -447,7 +447,7 @@ impl Darkfid { "Sent request to withdraw {} amount of {}", amount, token_id )), - json!(id.clone()), + id.clone(), )) } } @@ -522,7 +522,7 @@ impl Darkfid { .await; match result { - Ok(msg) => JsonResult::Resp(jsonresp(json!(msg), json!(id))), + Ok(_) => JsonResult::Resp(jsonresp(json!("Success"), id)), Err(err) => JsonResult::Err(jsonerr(InternalError, Some(err.to_string()), json!(id))), } }