aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/routes/methods.remote.ts
diff options
context:
space:
mode:
authorivar <i@oiee.no>2026-06-22 00:46:09 +0200
committerivar <i@oiee.no>2026-06-22 00:46:09 +0200
commitb8b6e229281be13258715870ddd0c2e1866dee12 (patch)
treecc136a2d0c2d9c031ec0b21f62c8a9f302e0ff57 /app/src/routes/methods.remote.ts
parent1aa60ed7f0b0af6c55df4a32bf2620934df63e6d (diff)
downloadsparebank1-actualbudget-b8b6e229281be13258715870ddd0c2e1866dee12.tar.xz
sparebank1-actualbudget-b8b6e229281be13258715870ddd0c2e1866dee12.zip
Remove webappHEADmaster
Diffstat (limited to 'app/src/routes/methods.remote.ts')
-rw-r--r--app/src/routes/methods.remote.ts38
1 files changed, 0 insertions, 38 deletions
diff --git a/app/src/routes/methods.remote.ts b/app/src/routes/methods.remote.ts
deleted file mode 100644
index d6fd908..0000000
--- a/app/src/routes/methods.remote.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { db } from "$lib/server/db";
-import { SyncSessionTable } from "$lib/server/db/schema";
-import { command, query } from "$app/server";
-import sb1 from "$lib/server/sb1";
-import actual from "$lib/server/actual";
-import { ImportForm } from "$lib/shared";
-
-const init_auth_session = command(async () => {
- return await sb1.auth.init_auth_session()
-})
-
-const clear_auth_session = query(async () => {
- await db.delete(SyncSessionTable)
-})
-
-const do_import = command(ImportForm, async (form) => {
- for (const mapping of form.mappings) {
- const transactions = await sb1.data.get_transactions(mapping.sb1Id)
- if (!transactions?.length) continue
- console.log(await actual.budget.import_transactions(mapping.actualId, transactions, form.dryRun))
- }
-})
-
-const init_sb1 = command(async () => {
- return await sb1.init()
-})
-
-const init_actual = command(async () => {
- return await actual.init()
-})
-
-export {
- init_auth_session,
- do_import,
- init_actual,
- init_sb1,
- clear_auth_session
-}