Switch cards.js to load full cards.json database
This commit is contained in:
parent
426443bc9e
commit
a11439eb58
1 changed files with 2 additions and 3 deletions
|
|
@ -1,11 +1,10 @@
|
|||
let cardDb = {};
|
||||
|
||||
export async function initCards() {
|
||||
const url = new URL("../data/starter-ironclad.json", import.meta.url);
|
||||
const url = new URL("../data/cards.json", import.meta.url);
|
||||
const res = await fetch(url);
|
||||
if (!res.ok) throw new Error(`failed to load card data: ${res.status}`);
|
||||
const starterIronclad = await res.json();
|
||||
cardDb = { ...starterIronclad };
|
||||
cardDb = await res.json();
|
||||
}
|
||||
|
||||
export function getCard(id) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue