From 9c8bc63ee13889545bc828ce6bd645fa1d7d4431 Mon Sep 17 00:00:00 2001 From: Sayem Chowdhury Date: Tue, 13 Apr 2021 13:27:38 +0600 Subject: [PATCH] support homepage --- src/api/api.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/api/api.ts b/src/api/api.ts index ca7e5d8..ec9abe6 100644 --- a/src/api/api.ts +++ b/src/api/api.ts @@ -138,10 +138,11 @@ export const getChannelList = async (): Promise => request({} /** * Get details about a playlist channel + * Return homepage if name is undefined */ -export const getPlaylistChannel = async (name: string): Promise => { +export const getPlaylistChannel = async (name?: string): Promise => { const gateway_input = { - page: 'channels/' + name, + page: name ? 'channels/' + name : 'home', version: '2.3', support: { 'long-card-horizontal-grid': ['album', 'playlist', 'radio', 'show', 'livestream'],