Additional minor improvements
This commit is contained in:
@@ -42,6 +42,10 @@ new CronJob( "0 0 0 * * *", function() {
|
|||||||
// Find all records in the weather cache
|
// Find all records in the weather cache
|
||||||
Cache.find( {}, function( err, records ) {
|
Cache.find( {}, function( err, records ) {
|
||||||
|
|
||||||
|
if ( err ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Cycle through each record
|
// Cycle through each record
|
||||||
records.forEach( function( record ) {
|
records.forEach( function( record ) {
|
||||||
|
|
||||||
|
|||||||
13
test/api.js
13
test/api.js
@@ -57,12 +57,13 @@ describe( "Weather API", function() {
|
|||||||
|
|
||||||
function apiTest( opt ) {
|
function apiTest( opt ) {
|
||||||
|
|
||||||
var opt = extend( {}, {
|
opt = extend( {}, {
|
||||||
method: 0,
|
method: 0,
|
||||||
key: "",
|
key: "",
|
||||||
format: "json"
|
format: "json"
|
||||||
}, opt ),
|
}, opt );
|
||||||
url = "/" + opt.method + "?loc=" + opt.loc + "&key=" + opt.key + "&format=" + opt.format;
|
|
||||||
|
var url = "/" + opt.method + "?loc=" + opt.loc + "&key=" + opt.key + "&format=" + opt.format;
|
||||||
|
|
||||||
setupMocks( opt.loc );
|
setupMocks( opt.loc );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user