mirror of
https://git.sr.ht/~cadence/cloudtube
synced 2026-06-01 06:56:48 +00:00
Update dependencies
Removes node-fetch in favour of node.js 20+ native fetch.
This commit is contained in:
parent
8815e4f10b
commit
095dc3f918
6 changed files with 648 additions and 135 deletions
|
|
@ -1,7 +1,5 @@
|
|||
/** @type {import("node-fetch").default} */
|
||||
// @ts-ignore
|
||||
const fetch = require("node-fetch")
|
||||
const constants = require("../utils/constants.js")
|
||||
const {Readable} = require("stream")
|
||||
|
||||
module.exports = [
|
||||
{
|
||||
|
|
@ -12,7 +10,7 @@ module.exports = [
|
|||
return {
|
||||
statusCode: 200,
|
||||
contentType: "image/jpeg",
|
||||
stream: res.body
|
||||
stream: Readable.fromWeb(res.body)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue