meow
This commit is contained in:
parent
66f249b2f3
commit
d27518d1ad
|
@ -46,8 +46,8 @@ async function getChannelVideos(id) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function actualRequest() {
|
async function actualRequest() {
|
||||||
try {
|
|
||||||
return new Promise(async (resolve, reject) => {
|
return new Promise(async (resolve, reject) => {
|
||||||
|
try {
|
||||||
const videos = []
|
const videos = []
|
||||||
const instance = await getInstance()
|
const instance = await getInstance()
|
||||||
const json = await (await fetch(`${instance}/channel/${id}`)).json()
|
const json = await (await fetch(`${instance}/channel/${id}`)).json()
|
||||||
|
@ -61,10 +61,11 @@ async function getChannelVideos(id) {
|
||||||
if (page.nextpage) await getNextPage(page.nextpage)
|
if (page.nextpage) await getNextPage(page.nextpage)
|
||||||
else resolve(videos)
|
else resolve(videos)
|
||||||
}
|
}
|
||||||
})
|
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
return false
|
reject(e.message)
|
||||||
}
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue