diff options
Diffstat (limited to 'backend/game/http.go')
| -rw-r--r-- | backend/game/http.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/backend/game/http.go b/backend/game/http.go index f9036c5..865c724 100644 --- a/backend/game/http.go +++ b/backend/game/http.go @@ -56,5 +56,10 @@ func (h *sockHandler) HandleSockGolfWatch(c echo.Context) error { if hub == nil { return echo.NewHTTPError(http.StatusNotFound, "Game not found") } + + if hub.game.gameType != gameType1v1 { + return echo.NewHTTPError(http.StatusBadRequest, "Only 1v1 game is supported") + } + return serveWatcherWs(hub, c.Response(), c.Request()) } |
