Adds deploy method
Some checks failed
/ build (push) Failing after 1s

This commit is contained in:
Michel 2024-11-07 18:28:45 +01:00
parent d0c56d5d76
commit 59e639eed6
3 changed files with 37 additions and 7 deletions

View file

@ -95,7 +95,7 @@ async function renderDetails(childRow: HTMLDivElement, gameid: number) {
childRow.removeChild(loadingContainer);
const parser = new DOMParser();
const gameDisplay: HTMLDivElement|null = parser.parseFromString(getDetailsHTML(gameData), 'text/html').body.firstChild;
const gameDisplay: HTMLDivElement|null = <HTMLDivElement|null>(parser.parseFromString(getDetailsHTML(gameData), 'text/html').body.firstChild);
if (!gameDisplay) {
return;
@ -103,10 +103,10 @@ async function renderDetails(childRow: HTMLDivElement, gameid: number) {
gameDisplay.querySelectorAll('.claim-btn').forEach(btn => {
btn.addEventListener('click', async () => {
const key = btn.closest('.key')?.dataset.keyId ?? 0;
const key = btn.closest<HTMLDivElement>('.key')?.dataset.keyId ?? 0;
const formData = new FormData();
formData.set('keyid', key);
formData.set('keyid', key.toString());
const response = await fetch(CLAIM_URL, {
method: 'POST',