Open views (#179)

* adjust todo

* Open view
This commit is contained in:
Brahim Hadriche authored and GitHub committed 2023-10-24 17:21:48 -04:00
1 parent 8975861615
commit 549913ef7d
14 files changed
+129 -20

No files matched your search

+14
View File
@@ -114,6 +114,20 @@ export class PlayletApi {
return await response.json();
}
static async openPlaylist(playlistId) {
if (!playlistId) {
return;
}
await fetch(`${PlayletApi.host()}/api/view/open?playlistId=${playlistId}`);
}
static async openChannel(authorId) {
if (!authorId) {
return;
}
await fetch(`${PlayletApi.host()}/api/view/open?authorId=${authorId}`);
}
static async getSearchHistory() {
const response = await fetch(`${PlayletApi.host()}/api/search-history`);
return await response.json();