Skip to content

fix: add workspace owner id as query param to websocket#18363

Merged
jaaydenh merged 5 commits into
mainfrom
jaaydenh/fix-workspace-owner
Jun 13, 2025
Merged

fix: add workspace owner id as query param to websocket#18363
jaaydenh merged 5 commits into
mainfrom
jaaydenh/fix-workspace-owner

Conversation

@jaaydenh
Copy link
Copy Markdown
Contributor

No description provided.

@jaaydenh jaaydenh self-assigned this Jun 13, 2025
@jaaydenh jaaydenh requested a review from Emyrk June 13, 2025 16:22
Comment thread coderd/parameters.go
Comment on lines +61 to +74
userID := apikey.UserID

qUserID := r.URL.Query().Get("user_id")
if qUserID != "" {
uid, err := uuid.Parse(qUserID)
if err != nil {
httpapi.Write(r.Context(), rw, http.StatusBadRequest, codersdk.Response{
Message: "Invalid user_id query parameter",
Detail: err.Error(),
})
return
}
userID = uid
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the BE change

Comment thread site/src/api/api.ts
Comment on lines 1031 to +1033
const socket = createWebSocket(
`/api/v2/templateversions/${versionId}/dynamic-parameters`,
new URLSearchParams({ user_id: userId }),
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed this

@jaaydenh jaaydenh merged commit 9a432b8 into main Jun 13, 2025
32 checks passed
@jaaydenh jaaydenh deleted the jaaydenh/fix-workspace-owner branch June 13, 2025 18:49
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants