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/actual.remote.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'app/src/routes/actual.remote.ts') 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 -- cgit v1.3