package authority

import (
	"context"

	v1 "kami/api/authority/v1"
	"kami/internal/model"
	"kami/internal/service"
)

func (c *ControllerV1) MenuCreate(ctx context.Context, req *v1.MenuCreateReq) (res *v1.MenuCreateRes, err error) {
	menu := service.Menu()
	err = menu.AddMenu(ctx, model.SysAuthRuleInput{SysAuthRuleReq: req.SysAuthRuleReq})
	return
}
