Commit 19e18742 authored by Zach Knox's avatar Zach Knox
Browse files

Wrap the data insert in a function to call it later

probably gonna need to do more with this
parent 2bdc3c5f
......@@ -3,7 +3,8 @@ import { Mongo } from 'meteor/mongo';
export const WeatherData = new Mongo.Collection('weather-data');
for(var key in LOCATIONS) {
export function refreshData() {
for(var key in LOCATIONS) {
const current = LOCATIONS[key];
var currentData'weatherDataForLoc',, current.long, function(err, res){
......@@ -16,4 +17,5 @@ for(var key in LOCATIONS) {
data: currentData,
lastUpdated: new Date(),
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