mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-10 07:08:05 -05:00
rcp/server: generalize RequestHandler so we can create multiple instances of it
This commit is contained in:
@@ -35,7 +35,7 @@ pub struct JsonRpcInterface {
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl RequestHandler for JsonRpcInterface {
|
||||
impl RequestHandler<()> for JsonRpcInterface {
|
||||
async fn handle_request(&self, req: JsonRequest) -> JsonResult {
|
||||
if req.params.as_array().is_none() {
|
||||
return JsonError::new(ErrorCode::InvalidRequest, None, req.id).into()
|
||||
|
||||
Reference in New Issue
Block a user