Redirect to pubsub node and some bug fixes #8
| @ -157,10 +157,9 @@ pub async fn list_contracts(req: ListVmContractsReq) -> Result<Vec<VmContract>, | |||||||
| } | } | ||||||
| 
 | 
 | ||||||
| pub async fn delete_vm(uuid: &str) -> Result<(), Error> { | 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 req = DeleteVmReq { uuid: uuid.to_string(), admin_pubkey: Config::get_detee_wallet()? }; | ||||||
|     let result = client.delete_vm(sign_request(req)?).await; |     match call_with_follow_redirect!(client, req, delete_vm).await { | ||||||
|     match result { |  | ||||||
|         Ok(confirmation) => { |         Ok(confirmation) => { | ||||||
|             log::debug!("VM deletion confirmation: {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> { | pub async fn update_vm(req: UpdateVmReq) -> Result<UpdateVmResp, Error> { | ||||||
|     info!("Updating VM {req:?}"); |     info!("Updating VM {req:?}"); | ||||||
|     let mut client = client().await?; |     let client = client().await?; | ||||||
|     let result = client.update_vm(sign_request(req)?).await; |     match call_with_follow_redirect!(client, req, update_vm).await { | ||||||
|     match result { |  | ||||||
|         Ok(resp) => { |         Ok(resp) => { | ||||||
|             let resp = resp.into_inner(); |             let resp = resp.into_inner(); | ||||||
|             if resp.error.is_empty() { |             if resp.error.is_empty() { | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user