Skip to content

Commit

Permalink
rm data wrapper on rpc api
Browse files Browse the repository at this point in the history
  • Loading branch information
canonbrother committed Nov 25, 2024
1 parent 1b58ee9 commit 053d004
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/ain-ocean/src/api/rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ fn method_whitelist(method: &str) -> Result<()> {
async fn rpc(
Extension(ctx): Extension<Arc<AppContext>>,
Json(body): Json<RpcDto>,
) -> Result<Response<serde_json::Value>> {
) -> Result<serde_json::Value> {
method_whitelist(&body.method)?;

let res: serde_json::Value = ctx.client.call(&body.method, &body.params).await?;

Ok(Response::new(res))
Ok(res)
}

pub fn router(ctx: Arc<AppContext>) -> Router {
Expand Down

0 comments on commit 053d004

Please sign in to comment.