Skip to content

Commit

Permalink
zuh
Browse files Browse the repository at this point in the history
  • Loading branch information
Owen3H committed Oct 27, 2023
1 parent bce0cfe commit 1c7327e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/endpoints.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"aurora": "https://earthmc.net/map/aurora/standalone/MySQL_configuration.php"
},
"towny": {
"v1/aurora":"https://api.earthmc.net/v1/aurora",
"v2/aurora":"https://api.earthmc.net/v2/aurora"
"aurora": "https://api.earthmc.net/v2/aurora"
}
}
4 changes: 2 additions & 2 deletions src/utils/endpoint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ const mapData = async (mapName: ValidMapName) => {
return res as MapResponse
}

const townyData = async (endpoint = '', version = 'v2') => {
const townyData = async (endpoint = '') => {
if (endpoint.startsWith("/"))
endpoint.replace("/", "")

const url = get("towny", `${version}/aurora`)
const url = get("towny", "aurora")
return await asJSON(`${url}${endpoint}?${genRandomString()}`) as unknown
}

Expand Down

0 comments on commit 1c7327e

Please sign in to comment.