From d78362c745c10804d1a680948f18a194dc0e0aa8 Mon Sep 17 00:00:00 2001 From: alemi Date: Wed, 7 Feb 2024 03:47:37 +0100 Subject: [PATCH] feat: getter for workspace name doesn't really make sense: it's user-defined because we connect to workspace contained inside token but store such connection with user given name --- src/client.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client.rs b/src/client.rs index 520ac91..d61beb2 100644 --- a/src/client.rs +++ b/src/client.rs @@ -144,6 +144,10 @@ impl Client { Ok(ws) } + pub fn get_workspace(&self, id: &str) -> Option> { + self.workspaces.get(id).map(|x| x.clone()) + } + /// accessor for user id pub fn user_id(&self) -> Uuid { self.user_id