diff --git a/scripts/import_users.js b/scripts/import_users.js index 84abd3a..ad1c84e 100644 --- a/scripts/import_users.js +++ b/scripts/import_users.js @@ -10,7 +10,7 @@ const {request} = require("../src/lib/utils/request") process.exit(1) } if (target.match(/^https?:\/\//)) { - var usersString = await request(target).then(res => res.text()) + var usersString = await request(target).text() } else { var usersString = await fs.readFile(target, {encoding: "utf8"}) } diff --git a/src/site/api/instances.js b/src/site/api/instances.js index b8c8ec2..07aa607 100644 --- a/src/site/api/instances.js +++ b/src/site/api/instances.js @@ -9,7 +9,7 @@ module.exports = [ { route: "/api/instances", methods: ["GET"], code: () => { return instanceListCache.getOrFetch("instances", () => { - return request(constants.resources.instances_wiki_raw).then(res => res.text()).then(text => { + return request(constants.resources.instances_wiki_raw).text().then(text => { const result = (() => { const instances = [] const parser = new Parser(text)