Add RPC let’ command as a duplicate of ‘set’ command

This commit is contained in:
Tobie Morgan Hitchcock 2022-07-08 21:55:44 +01:00
parent a430e89c1f
commit 11a3911f70

View file

@ -139,6 +139,10 @@ impl Rpc {
v if v.is_strand() => rpc.read().await.live(v).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() {
(Value::Strand(s), v) => rpc.write().await.set(s, v).await,
_ => return Response::failure(id, Failure::INVALID_PARAMS).send(chn).await,