(accountId, values)
| 1857 | } |
| 1858 | |
| 1859 | static async addM3UProfile(accountId, values) { |
| 1860 | try { |
| 1861 | const response = await request( |
| 1862 | `${host}/api/m3u/accounts/${accountId}/profiles/`, |
| 1863 | { |
| 1864 | method: 'POST', |
| 1865 | body: values, |
| 1866 | } |
| 1867 | ); |
| 1868 | |
| 1869 | // Refresh the playlist |
| 1870 | const playlist = await API.getPlaylist(accountId); |
| 1871 | usePlaylistsStore |
| 1872 | .getState() |
| 1873 | .updateProfiles(playlist.id, playlist.profiles); |
| 1874 | |
| 1875 | return response; |
| 1876 | } catch (e) { |
| 1877 | errorNotification(`Failed to add profile to account ${accountId}`, e); |
| 1878 | } |
| 1879 | } |
| 1880 | |
| 1881 | static async deleteM3UProfile(accountId, id) { |
| 1882 | try { |
no test coverage detected