loads of nonsense

This commit is contained in:
2026-05-04 17:55:29 +01:00
parent a7caf77284
commit 3f6e8073e9
23 changed files with 390 additions and 188 deletions

View File

@@ -1,16 +0,0 @@
import { betterAuth } from 'better-auth/minimal';
import { drizzleAdapter } from 'better-auth/adapters/drizzle';
import { sveltekitCookies } from 'better-auth/svelte-kit';
import { env } from '$env/dynamic/private';
import { getRequestEvent } from '$app/server';
import { db } from '$lib/server/db';
export const auth = betterAuth({
baseURL: env.ORIGIN,
secret: env.BETTER_AUTH_SECRET,
database: drizzleAdapter(db, { provider: 'sqlite' }),
emailAndPassword: { enabled: true },
plugins: [
sveltekitCookies(getRequestEvent) // make sure this is the last plugin in the array
]
});

View File

@@ -1 +0,0 @@
// If you see this file, you have not run the auth:schema script yet, but you should!

View File

@@ -1,9 +1,14 @@
import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core';
export const task = sqliteTable('task', {
id: text('id').primaryKey().$defaultFn(() => crypto.randomUUID()),
title: text('title').notNull(),
priority: integer('priority').notNull().default(1)
export const houses = sqliteTable('houses', {
id: integer('id').primaryKey({ autoIncrement: true }),
name: text('name').notNull(),
color: text('color').notNull().default('white'),
points: integer('points').notNull().default(0)
});
export * from './auth.schema';
export const consests = sqliteTable('contests', {
id: integer('id').primaryKey({ autoIncrement: true }),
event: text('event').notNull()
// house:dd make someting idk
});