package router

import (
	"fonchain-fiee/pkg/middleware"
	"fonchain-fiee/pkg/service"
	cronService "fonchain-fiee/pkg/service/cron"

	"github.com/gin-gonic/gin"
)

func cronRouter(r *gin.RouterGroup) {
	auth := r.Group("")
	auth.Use(middleware.CheckWebLogin(service.AccountProvider))
	cron := auth.Group("cron")
	{
		cron.POST("createScheduleTask", cronService.CreateScheduleTask)
		cron.POST("updateScheduleTask", cronService.UpdateScheduleTask)
		cron.POST("pauseScheduleTask", cronService.PauseScheduleTask)
		cron.POST("startScheduleTask", cronService.StartScheduleTask)
		cron.POST("republishScheduleTask", cronService.RepublishScheduleTask)
		cron.POST("deleteScheduleTask", cronService.DeleteScheduleTask)
		cron.POST("getListScheduleTask", cronService.GetListScheduleTask)
		cron.POST("getListExecutionResult", cronService.GetListExecutionResult)
		cron.POST("exportExcelExecutionResult", cronService.ExportExcelExecutionResult)
		cron.POST("getListExecutionRecord", cronService.GetListExecutionRecord)
		cron.POST("getScheduleTaskStatus", cronService.GetScheduleTaskStatus)
		cron.POST("getImportData", cronService.GetImportData)
	}

}
