Skip to content
Snippets Groups Projects
Commit bea4a835 authored by richard.petersen's avatar richard.petersen :sailboat:
Browse files

Fix: response.buffer is deprecated

parent 7261a9db
No related branches found
No related tags found
No related merge requests found
......@@ -9,7 +9,7 @@ const logger = getLogger()
async function fetchData (path, baseUrl) {
const response = await fetch(new URL(path, baseUrl))
if (!response.ok) throw new Error(`Error fetching file: ${path}`)
const content = await response.buffer()
const content = await response.text()
const sha256Sum = crypto.createHash('sha256').update(content).digest('base64')
return [path, {
'content-type': response.headers.get('content-type'),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment