Ejemplo n.º 1
0
        public async Task <UserRegLoginResp> UserRegiste([FromBody] UserRegLoginReq req)
        {
            var stateRes = CheckLoginModelState(req);

            if (!stateRes.IsSuccess())
            {
                return(stateRes.ConvertToResult <UserRegLoginResp>());
            }

            var userRes = await service.RegisteUser(req.name, req.pass_word, req.pass_code, req.type);

            return(GenerateUserToken(userRes));
        }