mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-11 03:24:16 +00:00
update livestream model
This commit is contained in:
parent
a3f3edd3c7
commit
358508b760
@ -42,18 +42,6 @@ export default class Livestream {
|
|||||||
return request.data
|
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) {
|
static async getCategories(key) {
|
||||||
const request = await app.cores.api.customRequest({
|
const request = await app.cores.api.customRequest({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
@ -66,26 +54,8 @@ export default class Livestream {
|
|||||||
return request.data
|
return request.data
|
||||||
}
|
}
|
||||||
|
|
||||||
static async getStreamInfo(payload) {
|
static async getLivestream(payload = {}) {
|
||||||
let { username } = payload ?? {}
|
if (!payload.username) {
|
||||||
|
|
||||||
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) {
|
|
||||||
throw new Error("Username is required")
|
throw new Error("Username is required")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -93,22 +63,14 @@ export default class Livestream {
|
|||||||
method: "GET",
|
method: "GET",
|
||||||
url: `/tv/streams`,
|
url: `/tv/streams`,
|
||||||
params: {
|
params: {
|
||||||
username,
|
username: payload.username,
|
||||||
|
profile_id: payload.profile_id,
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
return request.data
|
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() {
|
static async getLivestreams() {
|
||||||
const request = await app.cores.api.customRequest({
|
const request = await app.cores.api.customRequest({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user