Verify Google feedback is correct and use API key
This commit is contained in:
@@ -223,7 +223,7 @@ function getTimeData( location, callback ) {
|
|||||||
location[ 0 ],
|
location[ 0 ],
|
||||||
location[ 1 ],
|
location[ 1 ],
|
||||||
function( err, timezone ) {
|
function( err, timezone ) {
|
||||||
if ( err ) {
|
if ( err || timezone.status !== "OK" ) {
|
||||||
callback( false );
|
callback( false );
|
||||||
} else {
|
} else {
|
||||||
timezone = ( timezone.rawOffset + timezone.dstOffset ) / 60;
|
timezone = ( timezone.rawOffset + timezone.dstOffset ) / 60;
|
||||||
@@ -243,7 +243,8 @@ function getTimeData( location, callback ) {
|
|||||||
|
|
||||||
callback( weather );
|
callback( weather );
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
{ key: process.env.GOOGLE_API_KEY }
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user