mirror of
https://github.com/SrIzan10/lofi.git
synced 2026-06-06 00:56:53 +00:00
fix: random auth errors on prod
This commit is contained in:
@@ -192,7 +192,6 @@ const createAuthConfig = (baseURL = env.ORIGIN) =>
|
||||
type: 'boolean',
|
||||
required: true,
|
||||
input: false,
|
||||
fieldName: 'statistics_opt_out',
|
||||
defaultValue: false,
|
||||
},
|
||||
},
|
||||
|
||||
@@ -28,7 +28,7 @@ export const stations: Record<number, () => Promise<Song[]>> = new Proxy(customS
|
||||
},
|
||||
});
|
||||
|
||||
export const stationMetadata = Promise.resolve([
|
||||
export const getStationMetadata = async (): Promise<Station[]> => [
|
||||
...(await getChillhopData()).stations,
|
||||
{ id: 50000, name: 'Lofi Sleep' },
|
||||
]) as Promise<Station[]>;
|
||||
];
|
||||
|
||||
@@ -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(),
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user