Skip to content

chore: Add watch workspace endpoint #1493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix auth again
  • Loading branch information
f0ssel committed May 18, 2022
commit be27df51402dad44431dfd6eedf8607957ed7d5e
2 changes: 1 addition & 1 deletion coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ func New(options *Options) (http.Handler, func()) {
r.Put("/", api.putWorkspaceAutostop)
})
})
r.HandleFunc("/watch", api.watchWorkspace)
r.Get("/watch", api.watchWorkspace)
})
r.Route("/workspacebuilds/{workspacebuild}", func(r chi.Router) {
r.Use(
Expand Down
2 changes: 1 addition & 1 deletion coderd/coderd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func TestAuthorizeAllEndpoints(t *testing.T) {
"PUT:/api/v2/workspaces/{workspace}/autostop": {NoAuthorize: true},
"GET:/api/v2/workspaces/{workspace}/builds": {NoAuthorize: true},
"POST:/api/v2/workspaces/{workspace}/builds": {NoAuthorize: true},
"CONNECT:/api/v2/workspaces/{workspace}/watch": {NoAuthorize: true},
"GET:/api/v2/workspaces/{workspace}/watch": {NoAuthorize: true},

"POST:/api/v2/files": {NoAuthorize: true},
"GET:/api/v2/files/{hash}": {NoAuthorize: true},
Expand Down