Add RPC let’ command as a duplicate of ‘set’ command
This commit is contained in:
parent
a430e89c1f
commit
11a3911f70
1 changed files with 4 additions and 0 deletions
|
@ -139,6 +139,10 @@ impl Rpc {
|
||||||
v if v.is_strand() => rpc.read().await.live(v).await,
|
v if v.is_strand() => rpc.read().await.live(v).await,
|
||||||
_ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await,
|
_ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await,
|
||||||
},
|
},
|
||||||
|
"let" => match params.take_two() {
|
||||||
|
(Value::Strand(s), v) => rpc.write().await.set(s, v).await,
|
||||||
|
_ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await,
|
||||||
|
},
|
||||||
"set" => match params.take_two() {
|
"set" => match params.take_two() {
|
||||||
(Value::Strand(s), v) => rpc.write().await.set(s, v).await,
|
(Value::Strand(s), v) => rpc.write().await.set(s, v).await,
|
||||||
_ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await,
|
_ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await,
|
||||||
|
|
Loading…
Reference in a new issue