Skip to content

Commit

Permalink
fix riot api call params
Browse files Browse the repository at this point in the history
  • Loading branch information
ender-null committed May 11, 2024
1 parent 730ab2a commit 77e6e4e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/plugins/league-of-legends.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,10 @@ export class LeagueOfLegendsPlugin extends PluginBase {
} else {
endpoint = `https://${this.region['platform']}.${this.baseUrl}`;
}

const url = endpoint + method + `?api_key=${this.bot.config.apiKeys.riotApi}`;
const resp = await sendRequest(url, {}, null, null, false, this.bot);
const params = {
api_key: this.bot.config.apiKeys.riotApi,
};
const resp = await sendRequest(endpoint + method, params, null, null, false, this.bot);
const content = (await resp.json()) as any;
return content;
}
Expand Down

0 comments on commit 77e6e4e

Please sign in to comment.