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/actual.remote.ts | |
| parent | 57861411f37a07af3cd8fcf1520843e5a5e44bfc (diff) | |
| download | sparebank1-actualbudget-b883a2d96c0a1b0d22c300826c17b96a7b0880ef.tar.xz sparebank1-actualbudget-b883a2d96c0a1b0d22c300826c17b96a7b0880ef.zip | |
Add .gitattributes
Diffstat (limited to 'app/src/routes/actual.remote.ts')
| -rw-r--r-- | app/src/routes/actual.remote.ts | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/app/src/routes/actual.remote.ts b/app/src/routes/actual.remote.ts index bcf5d37..535e387 100644 --- a/app/src/routes/actual.remote.ts +++ b/app/src/routes/actual.remote.ts @@ -1,10 +1,10 @@ -import { command } from "$app/server"; +import { command, query } from "$app/server"; import { ACTUAL_HOST, ACTUAL_PASS } from "$env/static/private"; import * as actual from "@actual-app/api" import { existsSync, mkdirSync } from "node:fs"; import path from "node:path"; -export const initActual = command(async () => { +async function initActual() { const dataDir = path.resolve(__dirname, "actualDataDir"); if (!existsSync(dataDir)) mkdirSync(dataDir); @@ -14,4 +14,10 @@ export const initActual = command(async () => { serverURL: ACTUAL_HOST, dataDir: dataDir }) +} + +export const getActualMeta = query(async () => { + await initActual() + const accounts = await actual.getAccounts() + return })
\ No newline at end of file |
