package dailytask

import (
	"hyapp-admin-server/internal/middleware"

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

func RegisterRoutes(protected *gin.RouterGroup, h *Handler) {
	if h == nil {
		return
	}

	protected.GET("/admin/activity/daily-tasks", middleware.RequirePermission("daily-task:view"), h.ListTaskDefinitions)
	protected.POST("/admin/activity/daily-tasks", middleware.RequirePermission("daily-task:create"), h.CreateTaskDefinition)
	protected.PUT("/admin/activity/daily-tasks/:task_id", middleware.RequirePermission("daily-task:update"), h.UpdateTaskDefinition)
	protected.POST("/admin/activity/daily-tasks/:task_id/status", middleware.RequirePermission("daily-task:status"), h.SetTaskDefinitionStatus)
}
