package vclaimsepprint

import (
	"net/http"

	e "simrs-vx/internal/domain/bpjs-entities/vclaim-sep-print"
	u "simrs-vx/internal/use-case/bpjs-use-case/vclaim-sep-print"

	rw "github.com/karincake/risoles"
)

type myBase struct{}

var O myBase

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