This commit is contained in:
unknown 2023-03-24 16:07:31 +01:00
parent 66f249b2f3
commit d27518d1ad
1 changed files with 7 additions and 6 deletions

View File

@ -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)
} }
})
} }
} }