aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat-1 <github@matdoes.dev>2021-03-16 02:18:34 +0000
committermat-1 <github@matdoes.dev>2021-03-16 02:18:34 +0000
commitd45eb4378f32abc6e35d8a3f1a29b5fe3289c391 (patch)
tree0d43c8c80546f5e6bac1951937c538e2bdbc8287
parentabd801c61c780af525086f372bbffb10263f5d2f (diff)
downloadskyblock-api-d45eb4378f32abc6e35d8a3f1a29b5fe3289c391.tar.gz
skyblock-api-d45eb4378f32abc6e35d8a3f1a29b5fe3289c391.tar.bz2
skyblock-api-d45eb4378f32abc6e35d8a3f1a29b5fe3289c391.zip
Compiled TS into 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;