Commit 2bdc3c5f authored by Zach Knox's avatar Zach Knox
Browse files

Supposedly there is now data in the database now

Now to make it usable...
parent 093f1e30
...@@ -2,3 +2,18 @@ ...@@ -2,3 +2,18 @@
import { Mongo } from 'meteor/mongo'; import { Mongo } from 'meteor/mongo';
export const WeatherData = new Mongo.Collection('weather-data'); export const WeatherData = new Mongo.Collection('weather-data');
for(var key in LOCATIONS) {
const current = LOCATIONS[key];
var currentData
Meteor.call('weatherDataForLoc', current.lat, current.long, function(err, res){
currentData = res
});
WeatherData.insert ({
name: current.name,
lat: current.lat,
long: current.long,
data: currentData,
lastUpdated: new Date(),
});
}
...@@ -5,7 +5,7 @@ import { WeatherData } from '../api/data.js'; ...@@ -5,7 +5,7 @@ import { WeatherData } from '../api/data.js';
import '../../client/weather.html'; import '../../client/weather.html';
Template.body.helpers({ Template.body.helpers({
export function current() { current() {
return WeatherData.find({}); return WeatherData.find({});
}, },
}); });
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