aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--backend/admin/handler.go13
-rw-r--r--backend/main.go2
2 files changed, 4 insertions, 11 deletions
diff --git a/backend/admin/handler.go b/backend/admin/handler.go
index 4244788..8daead0 100644
--- a/backend/admin/handler.go
+++ b/backend/admin/handler.go
@@ -24,18 +24,11 @@ const (
var jst = time.FixedZone("Asia/Tokyo", 9*60*60)
type Handler struct {
- q *db.Queries
- hub GameHubInterface
+ q *db.Queries
}
-// TODO
-type GameHubInterface any
-
-func NewHandler(q *db.Queries, hub GameHubInterface) *Handler {
- return &Handler{
- q: q,
- hub: hub,
- }
+func NewHandler(q *db.Queries) *Handler {
+ return &Handler{q: q}
}
func newAdminMiddleware() echo.MiddlewareFunc {
diff --git a/backend/main.go b/backend/main.go
index 6e95ae1..06d37c3 100644
--- a/backend/main.go
+++ b/backend/main.go
@@ -70,7 +70,7 @@ func main() {
apiHandler := api.NewHandler(queries, gameHub)
api.RegisterHandlers(apiGroup, api.NewStrictHandler(apiHandler, nil))
- adminHandler := admin.NewHandler(queries, gameHub)
+ adminHandler := admin.NewHandler(queries)
adminGroup := e.Group("/phperkaigi/2025/code-battle/admin")
adminHandler.RegisterHandlers(adminGroup)