Merge pull request 'Move Server-Only Code to $lib/server' (#16) from issue-2 into main
Commit / ci (push) Has been cancelled

Reviewed-on: #16
This commit was merged in pull request #16.
This commit is contained in:
2026-04-03 13:40:06 +02:00
5 changed files with 6 additions and 6 deletions
@@ -1,7 +1,7 @@
import type { Session, User } from '@auth/sveltekit';
import { error } from '@sveltejs/kit';
import { db } from './server/db';
import { users } from './server/db/schema';
import { db } from './db';
import { users } from './db/schema';
import { eq } from 'drizzle-orm';
interface Event {
locals: {
+1 -1
View File
@@ -1,4 +1,4 @@
import { getSession as getSession } from '$lib/auth';
import { getSession as getSession } from '$lib/server/session';
import type { LayoutServerLoad } from './$types';
export const load: LayoutServerLoad = async (event) => {
+1 -1
View File
@@ -4,7 +4,7 @@ import { extractFormData } from '$lib/extractFormData';
import { resolve } from '$app/paths';
import * as v from 'valibot';
import { ensureAuth } from '$lib/auth';
import { ensureAuth } from '$lib/server/session';
import { db } from '$lib/server/db';
import { aktis } from '$lib/server/db/schema';
import sanitizeHtml from 'sanitize-html';
+1 -1
View File
@@ -3,7 +3,7 @@ import { aktis, ratings } from '$lib/server/db/schema';
import { error, redirect, type Actions } from '@sveltejs/kit';
import { and, eq } from 'drizzle-orm';
import type { PageServerLoad } from './$types';
import { ensureAuth } from '$lib/auth';
import { ensureAuth } from '$lib/server/session';
import { extractFormData } from '$lib/extractFormData';
import * as v from 'valibot';
import { resolve } from '$app/paths';
@@ -1,5 +1,5 @@
import type { PageServerLoad } from './$types';
import { ensureAuth } from '$lib/auth';
import { ensureAuth } from '$lib/server/session';
import { error, redirect, type Actions } from '@sveltejs/kit';
import { extractFormData } from '$lib/extractFormData';
import { aktis, ratings } from '$lib/server/db/schema';