aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-17 01:37:03 +0900
committernsfisis <nsfisis@gmail.com>2025-03-17 01:37:03 +0900
commit0c8ca0a895d8fbc99b0484c90b4f295027d0639c (patch)
treee27d91c67c3008858558ce0533f88afb7f640ac3
parent668937e3a195ae14d338352a496ec627bee0bf80 (diff)
downloadiosdc-japan-2025-albatross-0c8ca0a895d8fbc99b0484c90b4f295027d0639c.tar.gz
iosdc-japan-2025-albatross-0c8ca0a895d8fbc99b0484c90b4f295027d0639c.tar.zst
iosdc-japan-2025-albatross-0c8ca0a895d8fbc99b0484c90b4f295027d0639c.zip
refactor(backend): remove unused field
-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)