aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/game/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/game/http.go')
-rw-r--r--backend/game/http.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/backend/game/http.go b/backend/game/http.go
index 865c724..d513593 100644
--- a/backend/game/http.go
+++ b/backend/game/http.go
@@ -9,17 +9,17 @@ import (
"github.com/nsfisis/iosdc-japan-2024-albatross/backend/auth"
)
-type sockHandler struct {
- hubs *GameHubs
+type SockHandler struct {
+ hubs *Hubs
}
-func newSockHandler(hubs *GameHubs) *sockHandler {
- return &sockHandler{
+func newSockHandler(hubs *Hubs) *SockHandler {
+ return &SockHandler{
hubs: hubs,
}
}
-func (h *sockHandler) HandleSockGolfPlay(c echo.Context) error {
+func (h *SockHandler) HandleSockGolfPlay(c echo.Context) error {
jwt := c.QueryParam("token")
claims, err := auth.ParseJWT(jwt)
if err != nil {
@@ -38,7 +38,7 @@ func (h *sockHandler) HandleSockGolfPlay(c echo.Context) error {
return servePlayerWs(hub, c.Response(), c.Request(), claims.UserID)
}
-func (h *sockHandler) HandleSockGolfWatch(c echo.Context) error {
+func (h *SockHandler) HandleSockGolfWatch(c echo.Context) error {
jwt := c.QueryParam("token")
claims, err := auth.ParseJWT(jwt)
if err != nil {