mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 20:56:11 +01: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,5 +1,6 @@
|
||||
import { fetchBlitz, Region } from '@blitzkit/core';
|
||||
import { normalizeIds } from './normalizeIds';
|
||||
import { fetchBlitz } from "./fetchBlitz";
|
||||
import { normalizeIds } from "./normalizeIds";
|
||||
import { Region } from "./regions";
|
||||
|
||||
interface IndividualAccountAchievements {
|
||||
achievements: {
|
||||
@@ -22,11 +23,11 @@ export async function getAccountAchievements<
|
||||
>(region: Region, ids: Ids) {
|
||||
const object = await fetchBlitz<AccountAchievements>(
|
||||
region,
|
||||
'account/achievements',
|
||||
{ account_id: normalizeIds(ids) },
|
||||
"account/achievements",
|
||||
{ account_id: normalizeIds(ids) }
|
||||
);
|
||||
|
||||
if (typeof ids === 'number') {
|
||||
if (typeof ids === "number") {
|
||||
return object[ids as number] as ReturnType;
|
||||
} else {
|
||||
return ids.map((id) => object[id]) as ReturnType;
|
||||
|
||||
Reference in new issue
Block a user