package upload

import (
	"github.com/gin-gonic/gin"
	"go.uber.org/fx"
)

func registerRouter(r *gin.RouterGroup, s *UploadService) {
	org := r.Group("/diag")
	org.POST("/precreate", s.Precreate)
	org.POST("/flush", s.Flush)
	org.POST("/upload", s.Upload)
}

var Module = fx.Options(
	fx.Provide(NewUploadService),
	fx.Invoke(registerRouter))
