update_long_description.rs 611 B

12345678910111213141516171819202122232425
  1. use anyhow::Result;
  2. use clap::Args;
  3. use tonic::transport::Channel;
  4. use tonic::Request;
  5. use crate::cdk_mint_client::CdkMintClient;
  6. use crate::UpdateDescriptionRequest;
  7. #[derive(Args)]
  8. pub struct UpdateLongDescriptionCommand {
  9. description: String,
  10. }
  11. pub async fn update_long_description(
  12. client: &mut CdkMintClient<Channel>,
  13. sub_command_args: &UpdateLongDescriptionCommand,
  14. ) -> Result<()> {
  15. let _response = client
  16. .update_long_description(Request::new(UpdateDescriptionRequest {
  17. description: sub_command_args.description.clone(),
  18. }))
  19. .await?;
  20. Ok(())
  21. }