mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 20:19:49 +02:00
fix: self core imports
This commit is contained in:
1 parent
1790443698
commit
03a51c47bb
31 files changed
+143
-136
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { Region } from '@blitzkit/core';
|
||||
import { context } from '../blitzkit/context';
|
||||
import { regionToRegionSubdomain } from './regionToRegionSubdomain';
|
||||
import { context } from "../blitzkit/context";
|
||||
import { Region } from "./regions";
|
||||
import { regionToRegionSubdomain } from "./regionToRegionSubdomain";
|
||||
|
||||
type CurrentRatingPlayerSearch = Record<
|
||||
number,
|
||||
@@ -27,12 +27,12 @@ type CurrentRatingPlayerSearch = Record<
|
||||
export async function searchCurrentRatingPlayers(region: Region, name: string) {
|
||||
const encodedSearch = encodeURIComponent(name);
|
||||
const response = await fetch(
|
||||
context === 'website'
|
||||
context === "website"
|
||||
? `/api/${region}/rating/current/search/${encodedSearch}`
|
||||
: `https://${regionToRegionSubdomain(
|
||||
region,
|
||||
region
|
||||
)}.wotblitz.com/en/api/rating-leaderboards/search/?prefix=${encodedSearch}`,
|
||||
{ cache: 'no-store' },
|
||||
{ cache: "no-store" }
|
||||
);
|
||||
const accountList = (await response.json()) as CurrentRatingPlayerSearch;
|
||||
|
||||
|
||||
Reference in new issue
Block a user