mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 19:49:50 +02:00
fix: no search result edge case
This commit is contained in:
1 parent
bc5654619b
commit
74ce8b23eb
1 file changed
+1
-1
@@ -20,7 +20,7 @@ export async function execute(
|
|||||||
`https://api.wotblitz.${server}/wotb/account/list/?application_id=${process.env.WARGAMING_APPLICATION_ID}&search=${ign}`,
|
`https://api.wotblitz.${server}/wotb/account/list/?application_id=${process.env.WARGAMING_APPLICATION_ID}&search=${ign}`,
|
||||||
).then((response) => response.json())) as AccountList;
|
).then((response) => response.json())) as AccountList;
|
||||||
|
|
||||||
if (players?.data?.[0].nickname === ign) {
|
if (players?.data?.[0]?.nickname === ign) {
|
||||||
// good match
|
// good match
|
||||||
const clanData = (await fetch(
|
const clanData = (await fetch(
|
||||||
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${process.env.WARGAMING_APPLICATION_ID}&account_id=${players.data[0].account_id}&extra=clan`,
|
`https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${process.env.WARGAMING_APPLICATION_ID}&account_id=${players.data[0].account_id}&extra=clan`,
|
||||||
|
|||||||
Reference in new issue
Block a user