package upload

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

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

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

	protected.POST("/admin/files/upload", middleware.RequirePermission("upload:create"), h.UploadFile)
	protected.POST("/admin/files/image/upload", middleware.RequirePermission("upload:create"), h.UploadImage)
	protected.POST("/admin/files/batch-upload", middleware.RequirePermission("upload:create"), h.UploadFilesBatch)
	protected.POST("/admin/files/image/batch-upload", middleware.RequirePermission("upload:create"), h.UploadImagesBatch)
}
