refactor: remove retired data format support

This commit is contained in:
JB
2026-07-26 21:01:36 -04:00
parent 6ea45c05fa
commit 8b80e55e6c
17 changed files with 385 additions and 158 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import { gameDataIconUrl } from '$lib/server/game-data-icons';
import { getSessionUser } from '$lib/server/auth/session';
import { fail } from '@sveltejs/kit';
import { randomUUID } from 'node:crypto';
import { migrateLoadoutDraft } from '$lib/builder/loadout';
import { parseLoadoutDraft } from '$lib/builder/loadout';
import type { Actions, PageServerLoad } from './$types';
const validVisibility = new Set(['private', 'unlisted', 'public']);
@@ -13,7 +13,7 @@ const slugify = (value: string) => value.toLowerCase().normalize('NFKD')
function parseLoadout(raw: FormDataEntryValue | null) {
if (typeof raw !== 'string' || raw.length > 250_000) return null;
try {
return migrateLoadoutDraft(JSON.parse(raw));
return parseLoadoutDraft(JSON.parse(raw));
} catch {
return null;
}