// Code generated by goctl. DO NOT EDIT.
// goctl 1.10.1

package handler

import (
	"net/http"

	game "juwan-backend/app/game/api/internal/handler/game"
	"juwan-backend/app/game/api/internal/svc"

	"github.com/zeromicro/go-zero/rest"
)

func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
	server.AddRoutes(
		[]rest.Route{
			{
				// 获取游戏列表
				Method:  http.MethodGet,
				Path:    "/",
				Handler: game.ListGamesHandler(serverCtx),
			},
			{
				// 创建游戏
				Method:  http.MethodPost,
				Path:    "/",
				Handler: game.CreateGameHandler(serverCtx),
			},
			{
				// 获取游戏详情
				Method:  http.MethodGet,
				Path:    "/:id",
				Handler: game.GetGameHandler(serverCtx),
			},
		},
		rest.WithPrefix("/api/v1/games"),
	)
}
