Skip to content
This repository has been archived by the owner on Mar 15, 2023. It is now read-only.

Commit

Permalink
pass region names instead of region ids (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
lwojcik committed Dec 27, 2019
1 parent 55fc003 commit 66537b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/sc2pte.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ const bnetConfig = require('../config/battlenet');
function sc2pte(fastify, options, next) { // eslint-disable-line consistent-return
function blizzAPI(regionId) {
return new BlizzAPI({
region: regionId,
region: BlizzAPI.getRegionNameById(regionId)[0],
clientId: bnetConfig.apiKey,
clientSecret: bnetConfig.apiSecret,
});
}

function SC2API(regionId) {
return new StarCraft2API({
region: regionId,
region: BlizzAPI.getRegionNameById(regionId)[0],
clientId: bnetConfig.apiKey,
clientSecret: bnetConfig.apiSecret,
});
Expand Down

0 comments on commit 66537b5

Please sign in to comment.