mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-26 10:18:12 +01:00
use undici instead :3
This commit is contained in:
parent
68b27e5657
commit
26aedb331a
1 changed files with 3 additions and 2 deletions
|
@ -140,11 +140,12 @@ module.exports = function (app, config, renderTemplate) {
|
|||
});
|
||||
|
||||
app.get("/api/instances.json", async (req, res) => {
|
||||
const { fetch } = await import("undici");
|
||||
|
||||
try {
|
||||
const url = `https://codeberg.org/Ashley/poketube/raw/branch/main/instances.json`;
|
||||
|
||||
let f = await modules
|
||||
.fetch(url)
|
||||
let f = await fetch(url)
|
||||
.then((res) => res.text())
|
||||
.then((json) => JSON.parse(json));
|
||||
|
||||
|
|
Loading…
Reference in a new issue