Skip to content

Commit

Permalink
Change geoip to geo
Browse files Browse the repository at this point in the history
  • Loading branch information
gr0 committed Jun 29, 2020
1 parent 9c8e6da commit acf2a21
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ android {
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "2.3.0"
versionName "2.4.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
Expand Down
2 changes: 1 addition & 1 deletion logseneandroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion 19
targetSdkVersion 28
versionCode 4
versionName "2.3.0"
versionName "2.4.0"

testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,12 +514,12 @@ private void enrich(JSONObject obj) {

// create a location out of lat and lon fields
if (obj.has("lat") && obj.has("lon")) {
JSONObject geoip = new JSONObject();
geoip.put("location", String.format("%.2f,%.2f",
JSONObject geo = new JSONObject();
geo.put("location", String.format("%.2f,%.2f",
obj.getDouble("lat"), obj.getDouble("lon")));
obj.remove("lat");
obj.remove("lon");
obj.put("geoip", geoip);
obj.put("geo", geo);
}
} catch (JSONException e) {
// thrown when key is null in put(), so should never happen
Expand Down

0 comments on commit acf2a21

Please sign in to comment.