mirror of
https://github.com/vkaelin/LeagueStats.git
synced 2026-03-25 12:57:28 +00:00
Encode username on request
This commit is contained in:
parent
52d89e5f9c
commit
12e03718dc
1 changed files with 1 additions and 1 deletions
|
|
@ -81,7 +81,7 @@ app.post('/api', function (req, res) {
|
||||||
|
|
||||||
// Get account infos of an username
|
// Get account infos of an username
|
||||||
function getAccountInfos(callback) {
|
function getAccountInfos(callback) {
|
||||||
request('https://euw1.api.riotgames.com/lol/summoner/v4/summoners/by-name/' + pseudo + '?api_key=' + key, function (error, response, body) {
|
request('https://euw1.api.riotgames.com/lol/summoner/v4/summoners/by-name/' + encodeURIComponent(pseudo) + '?api_key=' + key, function (error, response, body) {
|
||||||
if (!error && response.statusCode == 200) {
|
if (!error && response.statusCode == 200) {
|
||||||
var JSONBody = JSON.parse(body);
|
var JSONBody = JSON.parse(body);
|
||||||
//console.log(JSONBody);
|
//console.log(JSONBody);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue