whoops...
This commit is contained in:
parent
6d1a72efa7
commit
12dfac4deb
|
@ -1,7 +1,7 @@
|
||||||
const fetch = require('node-fetch')
|
const fetch = require('node-fetch')
|
||||||
|
|
||||||
async function getInstance() {
|
async function getInstance() {
|
||||||
const instances = [await (await fetch('https://piped-instances.kavin.rocks/')).json()]
|
const instances = await (await fetch('https://piped-instances.kavin.rocks/')).json()
|
||||||
const list = instances.filter(i => !i.cdn)
|
const list = instances.filter(i => !i.cdn)
|
||||||
return (list[Math.floor(Math.random() * list.length)]).api_url
|
return (list[Math.floor(Math.random() * list.length)]).api_url
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue