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
This commit is contained in:
əlemi 2024-02-07 03:47:37 +01:00
parent 42ae4c0152
commit d78362c745

View file

@ -144,6 +144,10 @@ impl Client {
Ok(ws)
}
pub fn get_workspace(&self, id: &str) -> Option<Arc<Workspace>> {
self.workspaces.get(id).map(|x| x.clone())
}
/// accessor for user id
pub fn user_id(&self) -> Uuid {
self.user_id