Compare commits
No commits in common. "f8a80d7b71964c5582b3ab502b33466c3cd25de6" and "f229a4ae7e330b282caf86bd0b7eeaf9f811975d" have entirely different histories.
f8a80d7b71
...
f229a4ae7e
|
@ -22,10 +22,6 @@
|
|||
{
|
||||
Path: "/test2",
|
||||
Name: "test2",
|
||||
},
|
||||
{
|
||||
Path: "/card",
|
||||
Name: "Cards",
|
||||
}
|
||||
]
|
||||
</script>
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
let cards: Card[] = $state([]);
|
||||
let error: string | null = $state(null);
|
||||
let editingCard: Card | null = $state(null);
|
||||
let newCard: Partial<Card> = $state({
|
||||
let newCard: Partial<Card> = {
|
||||
balance: 0,
|
||||
credit_line: 0,
|
||||
have_credit_line: false,
|
||||
name: "",
|
||||
});
|
||||
};
|
||||
|
||||
// Fetch all cards on page load
|
||||
onMount(async () => {
|
||||
|
@ -18,7 +18,7 @@
|
|||
});
|
||||
|
||||
async function fetchCards() {
|
||||
const result = await fetch("/api/card/all");
|
||||
const result = await fetch("/api/card/all", { credentials: "same-origin" });
|
||||
if (!result.ok) {
|
||||
const obj = await result.json();
|
||||
error = obj.message;
|
||||
|
|
Loading…
Reference in New Issue
Block a user