diff --git a/frontend/src/routes/(app)/(internal)/compliance-assessments/[id=uuid]/export/word/+server.ts b/frontend/src/routes/(app)/(internal)/compliance-assessments/[id=uuid]/export/word/+server.ts index 055691e6d..561e6af8c 100644 --- a/frontend/src/routes/(app)/(internal)/compliance-assessments/[id=uuid]/export/word/+server.ts +++ b/frontend/src/routes/(app)/(internal)/compliance-assessments/[id=uuid]/export/word/+server.ts @@ -3,20 +3,20 @@ import { BASE_API_URL } from '$lib/utils/constants'; import { error } from '@sveltejs/kit'; import type { RequestHandler } from './$types'; export const GET: RequestHandler = async ({ fetch, params }) => { - const URLModel = 'compliance-assessments'; - const endpoint = `${BASE_API_URL}/${URLModel}/${params.id}/word_report/`; + const URLModel = 'compliance-assessments'; + const endpoint = `${BASE_API_URL}/${URLModel}/${params.id}/word_report/`; - const res = await fetch(endpoint); - if (!res.ok) { - error(400, 'Error fetching the Word file'); - } + const res = await fetch(endpoint); + if (!res.ok) { + error(400, 'Error fetching the Word file'); + } - const fileName = `audit-exec-summary-${new Date().toISOString()}.docx`; + const fileName = `audit-exec-summary-${new Date().toISOString()}.docx`; - return new Response(await res.blob(), { - headers: { - 'Content-Type': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'Content-Disposition': `attachment; filename="${fileName}"` - } - }); + return new Response(await res.blob(), { + headers: { + 'Content-Type': 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'Content-Disposition': `attachment; filename="${fileName}"` + } + }); };