Improved autonomies names, cron job return

This commit is contained in:
vjrj 2018-03-22 09:38:40 +01:00
parent de7c56d99b
commit 9ee01a6ef8
3 changed files with 13 additions and 10 deletions

View file

@ -34,6 +34,7 @@ const countFires = (regions, stringsToRemove) => {
regions.features.forEach((region) => {
const regionName = cleanProv(region.properties.name, stringsToRemove);
if (debug) console.log(`${regionName} -----`);
try {
const fires = findFiresInRegion(region);
// TODO Also check neighbour fires (when better implementation of that part)

View file

@ -16,11 +16,12 @@ const stringsToRemove = [
['Región de', ''],
['Valencia', 'CValenciana'],
['Comunidad de Madrid', 'CMadrid'],
['La Mancha', 'CLMancha'],
['León', 'CyL'],
['León', 'CyLeón'],
['Leon', 'CyLeón'],
['Castilla-', ''],
['Cataluña/', ''],
['Cataluña', 'Catalunya'],
['La Mancha', 'CLMancha'],
['Baleares', 'IllesBalears'],
['Galicia', 'Galiza'],
['Principado de', ''],
@ -65,7 +66,9 @@ const tweetFires = () => {
} else {
tweet(tweetText, 'es');
}
return tweetText;
}
return '';
};
if (Meteor.isDevelopment) {