summaryrefslogtreecommitdiff
path: root/api.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-05-12 16:57:38 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-05-13 23:33:44 +0200
commit3b0828ed33e636cc3c7bfcdb0218305adc6d654a (patch)
tree517a58706e9328f2a5671216c0905007fefb065c /api.js
parent2dc9b39806c7842c31f941e7f7060f5e6b18af1c (diff)
downloaddiscordbot-2.3.0.tar.gz
discordbot-2.3.0.zip
migrate API changes2.3.0
Diffstat (limited to 'api.js')
-rw-r--r--api.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/api.js b/api.js
index 7f0c35d..7dc7b44 100644
--- a/api.js
+++ b/api.js
@@ -190,6 +190,7 @@ module.exports.upsearchPlayer = async (name) => {
}
// block until update is completely done
+// TODO implement & use
module.exports.upsearchPlayerSync = async (name) => {
const waiter = await api.subscribeUpdates(name);
await api.upsearchPlayer(name);
@@ -204,7 +205,7 @@ module.exports.upsearchPlayerSync = async (name) => {
module.exports.getMatches = async (name) => {
const data = await api.getFE("/player/" + name + "/matches/1.1.1.1", {},
60 * 60, "matches+" + name);
- return data[0].data;
+ return data.data;
}
// return single match