Boa noite. Tudo bom ? Ao fazer um agendamento o servidor cai com o erro:
Servidor rodando em http://localhost:8080 Agendamento recebido: {"nomeCliente":"diego","enderecoCliente":"dasdasd aasdsad ","emailCliente":"diego.sistemas.carvalho@gmail.com","modeloCarro":"Sentra 2.0","precoTotal":53000} /home/diego/ionic/aluracar-webservice/api.js:67 const agendamentoId = agendamento.emailCliente + agendamento.data.substr(0, 10); ^
TypeError: Cannot read property 'substr' of undefined at enviaNotificacao (/home/diego/ionic/aluracar-webservice/api.js:67:74) at Timeout.setTimeout (/home/diego/ionic/aluracar-webservice/api.js:46:30) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)
npm ERR! Linux 4.4.0-127-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v6.11.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! api@1.0.0 start: node server.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the api@1.0.0 start script 'node server.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node server.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls api
npm ERR! There is likely additional logging output above.