mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-01-23 10:45:27 +00:00
Merge branch 'dev' of https://github.com/Dispatcharr/Dispatcharr into dev
This commit is contained in:
commit
476b7d825e
1 changed files with 3 additions and 1 deletions
|
|
@ -500,7 +500,9 @@ export default class API {
|
|||
|
||||
static async addPlaylist(values) {
|
||||
let body = null;
|
||||
let endpoint = `${host}/api/m3u/accounts/`;
|
||||
if (values.file) {
|
||||
endpoint = `${host}/api/m3u/accounts/upload/`;
|
||||
body = new FormData();
|
||||
for (const prop in values) {
|
||||
body.append(prop, values[prop]);
|
||||
|
|
@ -511,7 +513,7 @@ export default class API {
|
|||
body = JSON.stringify(body);
|
||||
}
|
||||
|
||||
const response = await fetch(`${host}/api/m3u/accounts/`, {
|
||||
const response = await fetch(endpoint, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: `Bearer ${await API.getAuthToken()}`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue