ignoring dwd garbage

master
cheetah 2 years ago
parent 139d9a1695
commit 91a751de78

@ -56,12 +56,14 @@ async function checkWOMAS() {
let dashboardData = await axios.get('https://warnung.bund.de/api31/dashboard/' + regId + '.json')
//console.log('dashboardData', dashboardData.data)
for (let alarmHead of dashboardData.data) {
if (alarmHead.id.indexOf('dwd.') == 0) continue
if (!stateMachine[ alarmHead.id ]) {
let alarmData = await axios.get('https://nina.api.proxy.bund.dev/api31/warnings/' + alarmHead.id + '.json')
for (let infoData of alarmData.data.info) {
await sendPage(region.preset, replaceUmlaute(infoData.headline))
break
}
console.log(stateMachine[ alarmHead.id ])
console.log(alarmHead.id, stateMachine[ alarmHead.id ])
stateMachine[ alarmHead.id ] = alarmData.data.info.length
}
//console.log('alarmData', alarmData.data)

Loading…
Cancel
Save