Private
Public Access
1
0

Add system board templates seeded at startup

Four templates (Kanban, Simple, Sprint, Bug Tracking) with tenantId=null
are auto-seeded on first startup if none exist. Available to all tenants
in the board creation dropdown.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Catherine Renelle
2026-02-26 07:33:08 -05:00
parent 9b5459fa49
commit 8a97d354fa
2 changed files with 43 additions and 1 deletions
+4 -1
View File
@@ -1,8 +1,11 @@
import type { Handle } from '@sveltejs/kit';
import { resolveTenant } from '$lib/server/tenant.js';
import { resolveTenant, seedSystemTemplates } from '$lib/server/tenant.js';
import { validateSession, sessionCookieName } from '$lib/server/auth.js';
import { logger } from '$lib/server/logger.js';
// One-time seed on startup
seedSystemTemplates().catch((e) => logger.error({ err: e }, 'Failed to seed system templates'));
export const handle: Handle = async ({ event, resolve }) => {
const start = Date.now();
// 1. Resolve tenant from hostname