package api

import (
	"gadmin/internal/admin/forms"
	"gadmin/internal/admin/service"
	"github.com/gin-gonic/gin"
	"github.com/sirupsen/logrus"
)

func StatisticsExport(c *gin.Context) {
	var req forms.StatisticsExportReq
	if err := c.ShouldBind(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	if err := forms.ParseParams(&req); err != nil {
		c.JSON(200, ErrorResponse(err))
		return
	}

	logrus.Warnf("FightingExport req:%+v", req)
	playerService := service.NewPlayerService(c)
	playerService.ExportStatistics(req)
}
