From d77776117e006b07beab7ac43b5276926115770c Mon Sep 17 00:00:00 2001 From: "matej.vukosav" Date: Sat, 21 Dec 2024 01:07:44 +1100 Subject: [PATCH] fix: join --- crates/meroctl/src/cli/context/invite.rs | 5 ++--- crates/meroctl/src/cli/context/join.rs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/meroctl/src/cli/context/invite.rs b/crates/meroctl/src/cli/context/invite.rs index 1040bef6a..274d6092b 100644 --- a/crates/meroctl/src/cli/context/invite.rs +++ b/crates/meroctl/src/cli/context/invite.rs @@ -61,9 +61,8 @@ impl InviteCommand { environment.output.write(&response); - let invitation_payload = response.data; - - let invitation_payload = invitation_payload + let invitation_payload = response + .data .ok_or_else(|| eyre::eyre!("No invitation payload found in the response"))?; Ok(invitation_payload) diff --git a/crates/meroctl/src/cli/context/join.rs b/crates/meroctl/src/cli/context/join.rs index 560197dc3..65349e5c8 100644 --- a/crates/meroctl/src/cli/context/join.rs +++ b/crates/meroctl/src/cli/context/join.rs @@ -38,7 +38,7 @@ impl Report for JoinContextResponse { impl JoinCommand { pub async fn run(self, environment: &Environment) -> EyreResult<()> { - let _ignored = self.join(environment); + let _ignored = self.join(environment).await?; Ok(()) }