Commit 467065a1 authored by Miguel Tavares's avatar Miguel Tavares
Browse files

frontend finished

parent 150dfd69
Pipeline #175 canceled with stages
......@@ -155,10 +155,10 @@
url: messageURl,
})
.then(function (response) {
// console.log('AFTER RESP ', response)
//console.log('AFTER RESP ', response)
if (response.status == 200) {
console.log('response ', response.data.messages)
if (response.data && response.data.length > 0) {
if (response.data && response.data.data && response.data.data.length > 0) {
console.log('should control ', )
// let finalStg = ''
// for(var i in response.data.messages)
......@@ -166,7 +166,7 @@
// finalStg += JSON.stringify(response.data.messages[i]) + '/n';
// }
addToTextarea($('#sensordata'), JSON.stringify(response.data))
addToTextarea($('#sensordata'), JSON.stringify(response.data.data))
}
} else {
// ico.addClass('dot_red');
......@@ -175,7 +175,6 @@
})
.catch(function (error) {
console.log('error getting messages ', error);
});
......
app = {
baseUrl: 'https://efpf.caixamagica.pt/efpfhtmlapp/',
baseUrl: 'http://localhost:4201',
getTemperatures: 'api/temperatures',
aliveRoute: 'api/alive'
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment