aboutsummaryrefslogtreecommitdiff
path: root/build/mojang.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/mojang.js')
-rw-r--r--build/mojang.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/build/mojang.js b/build/mojang.js
index afca782..b8bfa44 100644
--- a/build/mojang.js
+++ b/build/mojang.js
@@ -17,7 +17,9 @@ const httpsAgent = new https_1.Agent({
* Get mojang api data from ashcon.app
*/
async function mojangDataFromUser(user) {
- const fetchResponse = await node_fetch_1.default('https://api.ashcon.app/mojang/v2/user/' + user, { agent: () => httpsAgent });
+ const fetchResponse = await node_fetch_1.default(
+ // we use v1 rather than v2 since its more stable
+ `https://api.ashcon.app/mojang/v1/user/${user}`, { agent: () => httpsAgent });
return await fetchResponse.json();
}
exports.mojangDataFromUser = mojangDataFromUser;