aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/routes/sb1.remote.ts
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/routes/sb1.remote.ts')
-rw-r--r--app/src/routes/sb1.remote.ts38
1 files changed, 0 insertions, 38 deletions
diff --git a/app/src/routes/sb1.remote.ts b/app/src/routes/sb1.remote.ts
deleted file mode 100644
index 1ee0155..0000000
--- a/app/src/routes/sb1.remote.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { db } from "$lib/server/db";
-import { syncSession } from "$lib/server/db/schema";
-import * as v from "valibot"
-import { command, query } from "$app/server";
-import sb1 from "$lib/server/sb1";
-
-const init_auth_session = command(async () => {
- return await sb1.auth.init_auth_session()
-})
-
-const get_accounts = query(() => {
- return sb1.data.get_accounts()
-})
-
-const get_transactions = query(v.string(), (accountKey: string) => {
- return sb1.data.get_transactions(accountKey)
-})
-
-const clear_auth_session = query(async () => {
- await db.delete(syncSession)
-})
-
-const get_auth_info = query(() => {
- return sb1.auth.get_auth_info()
-})
-
-const refresh_tokem = command(async () => {
- await sb1.auth.refresh_token()
-})
-
-export {
- refresh_tokem,
- init_auth_session,
- get_accounts,
- get_transactions,
- clear_auth_session,
- get_auth_info,
-} \ No newline at end of file