mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-21 18:57:03 +02:00
fix: use regional season info instead of hard-coded NA
This commit is contained in:
1 parent
9e4094f3a9
commit
ffebe6c696
2 files changed
+26
-14
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { RatingsInfo } from '../../commands/ratings';
|
||||
import { Region } from '../../constants/regions';
|
||||
import regionToRegionSubdomain from './regionToRegionSubdomain';
|
||||
|
||||
export default async function getRatingsInfo(region: Region) {
|
||||
const response = await fetch(
|
||||
`https://${regionToRegionSubdomain(
|
||||
region,
|
||||
)}.wotblitz.com/en/api/rating-leaderboards/season/`,
|
||||
);
|
||||
return (await response.json()) as Promise<RatingsInfo>;
|
||||
}
|
||||
Reference in new issue
Block a user