package user

import (
	"context"

	v1 "cris/api/user/v1"
	"cris/internal/service"
)

func (c *ControllerV1) UserRegister(ctx context.Context, req *v1.UserRegisterReq) (res *v1.UserCommonRes, err error) {
	err = service.User().Register(ctx, req)
	if err != nil {
		return nil, err
	}
	res = &v1.UserCommonRes{
		Data:    nil,
		Message: "注册成功",
	}
	return res, nil
}
