Skip to content

Commit 84a5231

Browse files
committed
fix auth again
1 parent 159442b commit 84a5231

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

coderd/coderd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ func New(options *Options) (http.Handler, func()) {
311311
r.Put("/", api.putWorkspaceAutostop)
312312
})
313313
})
314-
r.HandleFunc("/watch", api.watchWorkspace)
314+
r.Get("/watch", api.watchWorkspace)
315315
})
316316
r.Route("/workspacebuilds/{workspacebuild}", func(r chi.Router) {
317317
r.Use(

coderd/coderd_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func TestAuthorizeAllEndpoints(t *testing.T) {
128128
"PUT:/api/v2/workspaces/{workspace}/autostop": {NoAuthorize: true},
129129
"GET:/api/v2/workspaces/{workspace}/builds": {NoAuthorize: true},
130130
"POST:/api/v2/workspaces/{workspace}/builds": {NoAuthorize: true},
131-
"CONNECT:/api/v2/workspaces/{workspace}/watch": {NoAuthorize: true},
131+
"GET:/api/v2/workspaces/{workspace}/watch": {NoAuthorize: true},
132132

133133
"POST:/api/v2/files": {NoAuthorize: true},
134134
"GET:/api/v2/files/{hash}": {NoAuthorize: true},

0 commit comments

Comments
 (0)