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

Supposedly there is now data in the database now

Now to make it usable...
parent 093f1e30
......@@ -2,3 +2,18 @@
import { Mongo } from 'meteor/mongo';
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';
import '../../client/weather.html';
Template.body.helpers({
export function current() {
current() {
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