chore: revert some changes

This commit is contained in:
pedrooot
2025-08-22 12:34:55 +02:00
parent 349e05b1d5
commit fcfd47ec2f
+4 -13
View File
@@ -348,22 +348,13 @@ export const getThreatscoreReport = async (scanId: string) => {
);
}
const filename = `scan-${scanId}-threatscore.pdf`;
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = filename;
document.body.appendChild(a);
a.click();
document.body.removeChild(a);
URL.revokeObjectURL(url);
const arrayBuffer = await response.arrayBuffer();
const base64 = Buffer.from(arrayBuffer).toString("base64");
return {
success: true,
data: url,
filename,
data: base64,
filename: `scan-${scanId}-threatscore.pdf`,
};
} catch (error) {
return {