Exemplo n.º 1
0
        public async Task <dynamic> CadastrarCliente(Cliente obj)
        {
            obj.cpf = obj.cpf.Replace(".", "").Replace("-", "");
            await _customerAPI.SignUpAsync(obj);

            var retorno = await Autenticar(obj.senha, "", obj.cpf);

            if (retorno.success)
            {
                return new { success = true, url = "/" }
            }
            ;
            else
            {
                return new { success = false, msg = "Não foi possível autenticar seu usuário." }
            };
        }