Redirect to pubsub node and some bug fixes #8

Merged
ghe0 merged 7 commits from pubsub_redirect into surreal_brain 2025-06-19 17:39:56 +00:00
Showing only changes of commit ddc5d24857 - Show all commits

@ -157,10 +157,9 @@ pub async fn list_contracts(req: ListVmContractsReq) -> Result<Vec<VmContract>,
}
pub async fn delete_vm(uuid: &str) -> Result<(), Error> {
let mut client = client().await?;
let client = client().await?;
let req = DeleteVmReq { uuid: uuid.to_string(), admin_pubkey: Config::get_detee_wallet()? };
let result = client.delete_vm(sign_request(req)?).await;
match result {
match call_with_follow_redirect!(client, req, delete_vm).await {
Ok(confirmation) => {
log::debug!("VM deletion confirmation: {confirmation:?}");
}
@ -195,9 +194,8 @@ pub async fn extend_vm(uuid: String, admin_pubkey: String, locked_nano: u64) ->
pub async fn update_vm(req: UpdateVmReq) -> Result<UpdateVmResp, Error> {
info!("Updating VM {req:?}");
let mut client = client().await?;
let result = client.update_vm(sign_request(req)?).await;
match result {
let client = client().await?;
match call_with_follow_redirect!(client, req, update_vm).await {
Ok(resp) => {
let resp = resp.into_inner();
if resp.error.is_empty() {