Playlists: Fix K8s list interface (#76993)

This commit is contained in:
Todd Treece 2023-10-23 15:47:39 -04:00 committed by GitHub
parent 4df4844c1d
commit b0eeeb9404
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -38,7 +38,7 @@ class LegacyAPI implements PlaylistAPI {
}
interface K8sPlaylistList {
playlists: K8sPlaylist[];
items: K8sPlaylist[];
}
interface K8sPlaylist {
@ -67,7 +67,7 @@ class K8sAPI implements PlaylistAPI {
async getAllPlaylist(): Promise<Playlist[]> {
const result = await getBackendSrv().get<K8sPlaylistList>(this.url);
return result.playlists.map(k8sResourceAsPlaylist);
return result.items.map(k8sResourceAsPlaylist);
}
async getPlaylist(uid: string): Promise<Playlist> {