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)
}
