fix(ST-507): split server-only code helpers into lib/code-server to keep client bundle clean

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Janpeter Visser 2026-04-26 20:42:55 +02:00
parent b71eb53fa8
commit f994219957
4 changed files with 41 additions and 37 deletions

View file

@ -7,7 +7,8 @@ import { z } from 'zod'
import { prisma } from '@/lib/prisma'
import { SessionData, sessionOptions } from '@/lib/session'
import { getAccessibleProduct } from '@/lib/product-access'
import { generateNextPbiCode, isValidCode, MAX_CODE_LENGTH, normalizeCode } from '@/lib/code'
import { isValidCode, MAX_CODE_LENGTH, normalizeCode } from '@/lib/code'
import { generateNextPbiCode } from '@/lib/code-server'
async function getSession() {
return getIronSession<SessionData>(await cookies(), sessionOptions)