diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-25 16:44:29 +0100 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-03-25 16:44:29 +0100 |
| commit | 3e5b13b58c976117c0862228bf0d9493f398eb87 (patch) | |
| tree | a89a69888fc19d6b3391321f3d9bd753cd71af69 | |
| parent | 3804a30ffe7e169665bcd0732738109ea5dd1061 (diff) | |
| download | bridge-3e5b13b58c976117c0862228bf0d9493f398eb87.tar.gz bridge-3e5b13b58c976117c0862228bf0d9493f398eb87.zip | |
fix API search
| -rw-r--r-- | api.js | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -47,12 +47,11 @@ async function api_playerByAttr(attr, val) { "X-Title-Id": "semc-vainglory", "Authorization": APITOKEN }, - qs: { - filter: val - }, + qs: {}, json: true, gzip: true }; + options.qs[filter] = val; try { res = await request(options); finds.push({ @@ -62,6 +61,9 @@ async function api_playerByAttr(attr, val) { "source": "api" }); } catch (err) { + if (err.statusCode != 404) { + console.error(err); + } // TODO } } |
