loads of nonsense
This commit is contained in:
@@ -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
|
||||
]
|
||||
});
|
||||
@@ -1 +0,0 @@
|
||||
// If you see this file, you have not run the auth:schema script yet, but you should!
|
||||
@@ -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
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user