Merge pull request 'feat: Switch to auth token' (#7) from feat/wigle-api into main

Reviewed-on: #7
This commit is contained in:
Philipp Schweizer 2025-01-02 14:24:13 +01:00
commit e3aebb041f
2 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ DB_PASSWORD=""
DB_HOST="" DB_HOST=""
DB_DIALECT="" DB_DIALECT=""
DB_PORT="" DB_PORT=""
WIGLE_TOKEN="" WIGLE_TOKEN="" # Go to account and generate token "Encoded for use"
WIGLE_BASE_URL="https://api.wigle.net" WIGLE_BASE_URL="https://api.wigle.net"
WIGLE_NETWORK_SEARCH="/api/v2/network/search" WIGLE_NETWORK_SEARCH="/api/v2/network/search"
GET_LOCATION_WIFI_MAX_AGE=1209600000 # 14 Tage in Millisekunden (14 * 24 * 60 * 60 * 1000) GET_LOCATION_WIFI_MAX_AGE=1209600000 # 14 Tage in Millisekunden (14 * 24 * 60 * 60 * 1000)

View File

@ -51,7 +51,7 @@ export const getLocationForWifi = async (
method: "GET", method: "GET",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
Cookie: `auth=${process.env.WIGLE_TOKEN}`, Authorization: `Basic ${process.env.WIGLE_TOKEN}`,
}, },
}); });
return await response.json(); return await response.json();