web-player: fix playlist ownership, sidebar counts, home spotlight and assorted page bugs
This commit is contained in:
@@ -9,7 +9,8 @@ export async function getAllowAnonymousListening(fetchFn: typeof fetch): Promise
|
||||
|
||||
try {
|
||||
const api = createApiClient({ fetch: fetchFn });
|
||||
const { data } = await api.GET('/config/playback');
|
||||
const { data, error } = await api.GET('/config/playback');
|
||||
if (error !== undefined) return cached?.allowAnonymousListening ?? false;
|
||||
const allowAnonymousListening = data?.allowAnonymousListening ?? false;
|
||||
|
||||
cached = { allowAnonymousListening, expiresAt: Date.now() + CACHE_TTL_MS };
|
||||
|
||||
Reference in New Issue
Block a user