Skip to content

Commit

Permalink
Removed console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
jLynx committed Jan 11, 2024
1 parent bb13f0f commit d80a941
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/app/components/Controller/Controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,13 @@ const Controller = () => {
throw new Error("Network response was not ok")
}

console.log(response.headers)

const contentDispositionHeader = response.headers.get("Content-Disposition")
console.log(contentDispositionHeader)
const filenameRegex = /filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/
let matches = contentDispositionHeader?.match(filenameRegex)
let filename =
matches && matches[1] ? matches[1].replace(/['"]/g, "") : "unknown.fail"

const blob = await response.blob()
console.log(blob)

return { blob, filename }
}
Expand All @@ -308,7 +304,7 @@ const Controller = () => {
)

await write(`flash /FIRMWARE/${fileBlob.filename}`, false, true)
console.log("DONE firmware update!")
console.log("DONE! firmware complete. Rebooting...")
alert("Firmware update complete! Please wait for your device to reboot.")
}

Expand Down

0 comments on commit d80a941

Please sign in to comment.