chore: update router

This commit is contained in:
Steven
2022-09-15 22:00:40 +08:00
parent 874b7768c8
commit b5d1ed0ee7
11 changed files with 59 additions and 55 deletions

View File

@ -22,6 +22,16 @@ const workspaceService = {
return workspaces;
},
getWorkspaceByName: (workspaceName: string) => {
const workspaceList = workspaceService.getState().workspaceList;
for (const workspace of workspaceList) {
if (workspace.name === workspaceName) {
return workspace;
}
}
return undefined;
},
getWorkspaceById: (id: WorkspaceId) => {
const workspaceList = workspaceService.getState().workspaceList;
for (const workspace of workspaceList) {