mirror of
https://github.com/fmhy/edit.git
synced 2026-01-18 01:41:52 +11:00
fix(api): set text/markdown header
This commit is contained in:
parent
f8ecf1a724
commit
2d4756d25a
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue