import { redirect } from '@sveltejs/kit';

// /playlists (list) moved to /library/playlists on 2026-06-01 as part of
// the nav restructure (Scribe 518). The detail route /playlists/[id]
// still lives here at /routes/playlists/[id]/+page.svelte — that URL
// matches the server API shape and is unchanged.
// 308 = permanent + preserve method; old bookmarks land on the new URL.
//
// Drift #559: this was a +page.server.ts which DOES NOT run in
// production (adapter-static + ssr=false, see +layout.ts). +page.ts
// universal load runs client-side and IS what the SPA executes.
export const load = () => {
  throw redirect(308, '/library/playlists');
};
