import ‘./body.html’;
import { Mongo } from ‘meteor/mongo’;
import { Tests } from ‘…/api/collect.js’;
Template.sendapi.events({
‘submit .new-task’ (event){
event.preventDefault();
const target = event.target;
const lat = target.lat.value;
const long = target.long.value;
console.log(long + ’ ’ +lat );
Tests.insert({
lat,
long,
createdAt: new Date(), // current time
});
target.lat.value = ‘’;
target.long.value = ‘’ ;
}
})