Skip to content

Commit

Permalink
nation password
Browse files Browse the repository at this point in the history
  • Loading branch information
Kractero committed Jan 21, 2025
1 parent 9b6f859 commit c729abb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/routes/tools/finder/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,10 @@
let currentNationXPin = ''
let nationSpecificPassword = ''
let nation = name
if (nation.includes(',')) {
nation = puppetList[i].split(',')[0]
nationSpecificPassword = puppetList[i].split(',')[1]
}
const xmlDocument = await parseXML(`${domain}/cgi-bin/api.cgi?nationname=${nation}&q=cards+deck`, main)
let cards: Array<Card> = xmlDocument.CARDS.DECK.CARD
cards = cards ? (Array.isArray(cards) ? cards : [cards]) : []
Expand All @@ -118,7 +122,7 @@
const prepare = await parseXML(
`${domain}/cgi-bin/api.cgi?nation=${nation}&cardid=${id}&season=${season}&to=${giftee}&mode=prepare&c=giftcard`,
main,
currentNationXPin ? '' : (nationSpecificPassword ? nationSpecificPassword : password),
currentNationXPin ? '' : nationSpecificPassword ? nationSpecificPassword : password,
currentNationXPin || ''
)
Expand Down Expand Up @@ -200,7 +204,7 @@
const prepare = await parseXML(
`${domain}/cgi-bin/api.cgi?nation=${nation}&cardid=${id}&season=${season}&to=${giftee}&mode=prepare&c=giftcard`,
main,
currentNationXPin ? '' : (nationSpecificPassword ? nationSpecificPassword : password),
currentNationXPin ? '' : nationSpecificPassword ? nationSpecificPassword : password,
currentNationXPin || ''
)
Expand Down

0 comments on commit c729abb

Please sign in to comment.