aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/routes/methods.remote.ts
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/routes/methods.remote.ts')
-rw-r--r--app/src/routes/methods.remote.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/src/routes/methods.remote.ts b/app/src/routes/methods.remote.ts
new file mode 100644
index 0000000..c669164
--- /dev/null
+++ b/app/src/routes/methods.remote.ts
@@ -0,0 +1,20 @@
+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 clear_auth_session = query(async () => {
+ await db.delete(syncSession)
+})
+
+
+export {
+ init_auth_session,
+ clear_auth_session
+} \ No newline at end of file