aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-08-01 21:39:31 +0900
committernsfisis <nsfisis@gmail.com>2024-08-01 21:39:31 +0900
commit9baf2a7110ecef0eb97301b179bf5a3ca9e9b774 (patch)
tree1767a3404b19ab277312caccf442e9f88f2fcba1 /backend
parent0de9bf8ddbc2128e472b6a40d92bffbbf829fe42 (diff)
downloadiosdc-japan-2024-albatross-9baf2a7110ecef0eb97301b179bf5a3ca9e9b774.tar.gz
iosdc-japan-2024-albatross-9baf2a7110ecef0eb97301b179bf5a3ca9e9b774.tar.zst
iosdc-japan-2024-albatross-9baf2a7110ecef0eb97301b179bf5a3ca9e9b774.zip
refactor(backend): `Id` to `ID` in echo path params
Diffstat (limited to 'backend')
-rw-r--r--backend/game/http.go4
-rw-r--r--backend/main.go4
2 files changed, 4 insertions, 4 deletions
diff --git a/backend/game/http.go b/backend/game/http.go
index 18f6cda..f9036c5 100644
--- a/backend/game/http.go
+++ b/backend/game/http.go
@@ -27,7 +27,7 @@ func (h *sockHandler) HandleSockGolfPlay(c echo.Context) error {
}
// TODO: check user permission
- gameID, err := strconv.Atoi(c.Param("gameId"))
+ gameID, err := strconv.Atoi(c.Param("gameID"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, "Invalid game id")
}
@@ -48,7 +48,7 @@ func (h *sockHandler) HandleSockGolfWatch(c echo.Context) error {
return echo.NewHTTPError(http.StatusForbidden, "Permission denied")
}
- gameID, err := strconv.Atoi(c.Param("gameId"))
+ gameID, err := strconv.Atoi(c.Param("gameID"))
if err != nil {
return echo.NewHTTPError(http.StatusBadRequest, "Invalid game id")
}
diff --git a/backend/main.go b/backend/main.go
index 0257113..939df03 100644
--- a/backend/main.go
+++ b/backend/main.go
@@ -65,10 +65,10 @@ func main() {
defer gameHubs.Close()
sockGroup := e.Group("/sock")
sockHandler := gameHubs.SockHandler()
- sockGroup.GET("/golf/:gameId/play", func(c echo.Context) error {
+ sockGroup.GET("/golf/:gameID/play", func(c echo.Context) error {
return sockHandler.HandleSockGolfPlay(c)
})
- sockGroup.GET("/golf/:gameId/watch", func(c echo.Context) error {
+ sockGroup.GET("/golf/:gameID/watch", func(c echo.Context) error {
return sockHandler.HandleSockGolfWatch(c)
})