Skip to content

Commit

Permalink
cmd/oberon-emu/internal/canvas: use explicit HTTP methods
Browse files Browse the repository at this point in the history
  • Loading branch information
fzipp committed Feb 11, 2024
1 parent 28b78bf commit e5aca49
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/oberon-emu/internal/canvas/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ func ListenAndServe(addr string, run func(*Context), size image.Rectangle) error

func newServeMux(run func(*Context), config config) *http.ServeMux {
mux := http.NewServeMux()
mux.Handle("/", &htmlHandler{
mux.Handle("GET /", &htmlHandler{
config: config,
})
mux.HandleFunc("/canvas-websocket.js", javaScriptHandler)
mux.Handle("/draw", &drawHandler{
mux.HandleFunc("GET /canvas-websocket.js", javaScriptHandler)
mux.Handle("GET /draw", &drawHandler{
config: config,
draw: run,
})
Expand Down

0 comments on commit e5aca49

Please sign in to comment.