From b883a2d96c0a1b0d22c300826c17b96a7b0880ef Mon Sep 17 00:00:00 2001 From: ivar Date: Wed, 10 Dec 2025 22:59:15 +0100 Subject: Add .gitattributes --- app/src/routes/sb1.remote.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'app/src/routes/sb1.remote.ts') diff --git a/app/src/routes/sb1.remote.ts b/app/src/routes/sb1.remote.ts index 3d5763e..17e1ead 100644 --- a/app/src/routes/sb1.remote.ts +++ b/app/src/routes/sb1.remote.ts @@ -31,7 +31,7 @@ async function createSb1Auth() { export const getAccounts = query(async () => { const token = await getSb1AccessToken() - if (!token) return [] + if (!token) return undefined const url = new URL( "https://api.sparebank1.no/personal/banking/accounts", ); @@ -41,9 +41,7 @@ export const getAccounts = query(async () => { }, }); if (response.ok) { - const json = await response.json() - console.log(json) - return json + return await response.json() as { accounts: Array } } else console.error(await response.text()) }) @@ -55,7 +53,6 @@ export const getTransactions = query(v.string(), async (accountKey: string) => { "https://api.sparebank1.no/personal/banking/transactions", ); url.searchParams.set("accountKey", accountKey); - console.log(token) const response = await fetch(url, { headers: { Authorization: `Bearer ${token}`, -- cgit v1.3