Skip to content

Commit 9368c48

Browse files
committed
Drop owner_id from query params
1 parent ebcb831 commit 9368c48

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

coderd/workspaces.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ func (api *API) workspaces(rw http.ResponseWriter, r *http.Request) {
134134
filter := database.GetWorkspacesWithFilterParams{
135135
Deleted: false,
136136
OrganizationID: parser.ParseUUID(r, uuid.Nil, "organization_id"),
137-
OwnerID: parser.ParseUUIDorMe(r, uuid.Nil, apiKey.UserID, "owner_id"),
138137
OwnerUsername: parser.ParseString(r, "", "owner"),
139138
TemplateName: parser.ParseString(r, "", "template"),
140139
TemplateIds: parser.ParseUUIDArray(r, []uuid.UUID{}, "template_ids"),
@@ -149,12 +148,6 @@ func (api *API) workspaces(rw http.ResponseWriter, r *http.Request) {
149148
}
150149

151150
if filter.OwnerUsername == "me" {
152-
if !(filter.OwnerID == uuid.Nil || filter.OwnerID == apiKey.UserID) {
153-
httpapi.Write(rw, http.StatusBadRequest, httpapi.Response{
154-
Message: "Cannot set both \"me\" in \"owner_name\" and use \"owner_id\".",
155-
})
156-
return
157-
}
158151
filter.OwnerID = apiKey.UserID
159152
filter.OwnerUsername = ""
160153
}

0 commit comments

Comments
 (0)