diff options
| author | ivar <i@oiee.no> | 2025-12-10 22:59:15 +0100 |
|---|---|---|
| committer | ivar <i@oiee.no> | 2025-12-10 22:59:15 +0100 |
| commit | b883a2d96c0a1b0d22c300826c17b96a7b0880ef (patch) | |
| tree | 8823cf0ec7ca760ec1fcb00aae6fbb4cdd34a066 /app/src/routes/sb1.remote.ts | |
| parent | 57861411f37a07af3cd8fcf1520843e5a5e44bfc (diff) | |
| download | sparebank1-actualbudget-b883a2d96c0a1b0d22c300826c17b96a7b0880ef.tar.xz sparebank1-actualbudget-b883a2d96c0a1b0d22c300826c17b96a7b0880ef.zip | |
Add .gitattributes
Diffstat (limited to 'app/src/routes/sb1.remote.ts')
| -rw-r--r-- | app/src/routes/sb1.remote.ts | 7 |
1 files changed, 2 insertions, 5 deletions
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<any> } } 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}`, |
