aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/routes/methods.remote.ts
blob: c66916494a59289948d04e5302efba4549675e8c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
}