diff --git a/README.md b/README.md index 6a58ea3..83df041 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ To read a database, make a GET request as follows: `GET /api/last` * token - (required) the read token for the database * tz - (optional, default UTC) timezone string (e.g. America/Los_Angeles) which will be used to determine the absolute start/end times for the day -* date - (optional, default to now) specify a full timestamp to return a single record before this date (the point returned will be no more than 24 hours before the given date) +* before - (optional, default to now) specify a full timestamp to return a single record before this date (the point returned will be no more than 24 hours before the given date) * geocode - (optional) if "true", then the location found will be reverse geocoded using [Atlas](https://atlas.p3k.io) to find the city and timezone at the location diff --git a/compass/app/Http/Controllers/Api.php b/compass/app/Http/Controllers/Api.php index fd0e623..27e846f 100644 --- a/compass/app/Http/Controllers/Api.php +++ b/compass/app/Http/Controllers/Api.php @@ -189,6 +189,8 @@ class Api extends BaseController $geocode = json_decode(curl_exec($ch)); if($geocode) { $response['geocode'] = $geocode; + } else { + $response['geocode'] = null; } }