Skip to content
This repository was archived by the owner on Jan 10, 2020. It is now read-only.

Commit 58bd704

Browse files
committed
Reduce info to only location to try and reduce traffic
1 parent aa26514 commit 58bd704

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ipapi",
3-
"version": "2.1.0",
3+
"version": "3.0.0",
44
"description": "Placeholder package.json, this app is now written in Rust",
55
"main": "none.js",
66
"scripts": {

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ fn ip_request_handler(ip: IpAddr, reader: &maxminddb::Reader) -> Response {
5959
.expect("Time went backwards");
6060
return Response::json(&json!({
6161
"ip": ip,
62-
"geo": city,
62+
"geo": city.location,
6363
"time": timestamp.as_secs(),
64-
"api_version": "2.0.0"
64+
"api_version": "3.0.0"
6565
})).with_unique_header("cache-control", "s-maxage=172800, maxage=0");
6666
}
6767
}

0 commit comments

Comments
 (0)