Files
sim-server/app/main/api/internal/handler/admin_agent/AdminGetRegionDistributionHandler.go

22 lines
563 B
Go
Raw Normal View History

2026-02-08 16:19:37 +08:00
package admin_agent
import (
"net/http"
"github.com/zeromicro/go-zero/rest/httpx"
"sim-server/app/main/api/internal/logic/admin_agent"
"sim-server/app/main/api/internal/svc"
)
func AdminGetRegionDistributionHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
return func(w http.ResponseWriter, r *http.Request) {
l := admin_agent.NewAdminGetRegionDistributionLogic(r.Context(), svcCtx)
resp, err := l.AdminGetRegionDistribution()
if err != nil {
httpx.ErrorCtx(r.Context(), w, err)
} else {
httpx.OkJsonCtx(r.Context(), w, resp)
}
}
}