package generatefile

import (
	"net/http"

	rw "github.com/karincake/risoles"

	u "simrs-vx/internal/use-case/main-use-case/generate-file"
)

func Generate(w http.ResponseWriter, r *http.Request) {
	dto := u.GenerateDto{}
	if res := rw.ValidateStructByIOR(w, r.Body, &dto); !res {
		return
	}
	res, err := u.Generate(dto)
	rw.DataResponse(w, res, err)
}
