fix(api): set text/markdown header

This commit is contained in:
taskylizard 2024-08-01 11:15:07 +00:00
parent f8ecf1a724
commit 2d4756d25a
No known key found for this signature in database
GPG key ID: 1820131ED1A24120

View file

@ -44,7 +44,7 @@ export default defineEventHandler(async (event) => {
return isMarkdownFile && !isExcludedFile && !isInExcludedDirectory return isMarkdownFile && !isExcludedFile && !isInExcludedDirectory
}) })
console.info(markdownFiles.map((f) => f.name)) // console.info(markdownFiles.map((f) => f.name))
// Fetch and concatenate the contents of the markdown files // Fetch and concatenate the contents of the markdown files
const contents = await Promise.all( const contents = await Promise.all(
@ -63,6 +63,6 @@ export default defineEventHandler(async (event) => {
} }
// biome-ignore lint/correctness/noUndeclaredVariables: <explanation> // biome-ignore lint/correctness/noUndeclaredVariables: <explanation>
appendResponseHeader(event, 'content-type', 'text/plain') appendResponseHeader(event, 'content-type', 'text/markdown;charset=utf-8')
return body return body
}) })