From 4b61dc03141f90f68d244abf351233a5a67e48b1 Mon Sep 17 00:00:00 2001 From: Izan Gil <66965250+SrIzan10@users.noreply.github.com> Date: Fri, 24 Apr 2026 23:30:32 +0200 Subject: [PATCH] fix: random auth errors on prod --- src/lib/server/auth.ts | 1 - src/lib/stations/index.ts | 4 ++-- src/routes/api/stations/+server.ts | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/server/auth.ts b/src/lib/server/auth.ts index 1c989a8..944a121 100644 --- a/src/lib/server/auth.ts +++ b/src/lib/server/auth.ts @@ -192,7 +192,6 @@ const createAuthConfig = (baseURL = env.ORIGIN) => type: 'boolean', required: true, input: false, - fieldName: 'statistics_opt_out', defaultValue: false, }, }, diff --git a/src/lib/stations/index.ts b/src/lib/stations/index.ts index 5ee7db9..5241cdd 100644 --- a/src/lib/stations/index.ts +++ b/src/lib/stations/index.ts @@ -28,7 +28,7 @@ export const stations: Record Promise> = new Proxy(customS }, }); -export const stationMetadata = Promise.resolve([ +export const getStationMetadata = async (): Promise => [ ...(await getChillhopData()).stations, { id: 50000, name: 'Lofi Sleep' }, -]) as Promise; +]; diff --git a/src/routes/api/stations/+server.ts b/src/routes/api/stations/+server.ts index a89f26a..4ceb3c8 100644 --- a/src/routes/api/stations/+server.ts +++ b/src/routes/api/stations/+server.ts @@ -1,10 +1,10 @@ -import { stationMetadata } from '@/stations'; +import { getStationMetadata } from '@/stations'; import { getChillhopData } from '@/utils'; import type { RequestHandler } from '@sveltejs/kit'; export const GET: RequestHandler = async () => { const responses = await Promise.all([ - stationMetadata, + getStationMetadata(), getChillhopData(), ]);