Skip to content

Commit

Permalink
feat: use app state to store request workspace id
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <[email protected]>
  • Loading branch information
SuZhou-Joe committed Apr 3, 2024
1 parent dd6cebf commit 7fd5160
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plugins/workspace/server/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class WorkspacePlugin implements Plugin<{}, {}> {

if (workspaceId) {
updateWorkspaceState(request, {
id: workspaceId,
requestWorkspaceId: workspaceId,
});
const requestUrl = new URL(request.url.toString());
requestUrl.pathname = cleanWorkspaceId(requestUrl.pathname);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class WorkspaceIdConsumerWrapper {
): T {
const { workspaces, ...others } = options || {};
const workspaceState = getWorkspaceState(request);
const workspaceIdParsedFromRequest = workspaceState?.id;
const workspaceIdParsedFromRequest = workspaceState?.requestWorkspaceId;
const workspaceIdsInUserOptions = options?.workspaces;
let finalWorkspaces: string[] = [];
if (options?.hasOwnProperty('workspaces')) {
Expand Down

0 comments on commit 7fd5160

Please sign in to comment.