update livestream model

This commit is contained in:
SrGooglo 2023-04-10 16:21:21 +00:00
parent a3f3edd3c7
commit 358508b760

View File

@ -42,18 +42,6 @@ export default class Livestream {
return request.data
}
static async updateLivestreamInfo(payload) {
const request = await app.cores.api.customRequest({
method: "POST",
url: `/tv/stream/info`,
data: {
...payload
},
})
return request.data
}
static async getCategories(key) {
const request = await app.cores.api.customRequest({
method: "GET",
@ -66,26 +54,8 @@ export default class Livestream {
return request.data
}
static async getStreamInfo(payload) {
let { username } = payload ?? {}
if (!username) {
username = app.userData.username
}
const request = await app.cores.api.customRequest({
method: "GET",
url: `/tv/stream/info`,
params: {
username,
}
})
return request.data
}
static async getLivestream({ username }) {
if (!username) {
static async getLivestream(payload = {}) {
if (!payload.username) {
throw new Error("Username is required")
}
@ -93,22 +63,14 @@ export default class Livestream {
method: "GET",
url: `/tv/streams`,
params: {
username,
username: payload.username,
profile_id: payload.profile_id,
}
})
return request.data
}
static async getAddresses() {
const request = await app.cores.api.customRequest({
method: "GET",
url: `/tv/streaming/addresses`,
})
return request.data
}
static async getLivestreams() {
const request = await app.cores.api.customRequest({
method: "GET",