Remove node-fetch

This commit is contained in:
Cadence Ember
2025-02-11 12:51:58 +13:00
parent 7782c120bf
commit 984d4362a5
14 changed files with 30 additions and 131 deletions
+1 -2
View File
@@ -3,7 +3,6 @@
const tryToCatch = require("try-to-catch")
const {test} = require("supertape")
const {router} = require("../../../test/web")
const fetch = require("node-fetch")
test("web download matrix: access denied if not a known attachment", async t => {
const [error] = await tryToCatch(() =>
@@ -27,7 +26,7 @@ test("web download matrix: works if a known attachment", async t => {
event,
api: {
async getMedia(mxc, init) {
return new fetch.Response("", {status: 200, headers: {"content-type": "image/png"}})
return new Response("", {status: 200, headers: {"content-type": "image/png"}})
}
}
})
-1
View File
@@ -5,7 +5,6 @@ const {randomUUID} = require("crypto")
const {defineEventHandler, getValidatedQuery, sendRedirect, createError} = require("h3")
const {SnowTransfer} = require("snowtransfer")
const DiscordTypes = require("discord-api-types/v10")
const fetch = require("node-fetch")
const getRelativePath = require("get-relative-path")
const {as, db, sync} = require("../../passthrough")