Aktueller Stand

This commit is contained in:
2026-01-22 19:05:45 +01:00
parent 85dee61a4d
commit e280e4eadb
1967 changed files with 397327 additions and 74093 deletions

View File

@@ -108,7 +108,7 @@ const dirList = {
*/
send: async function ({ reply, dir, options, route, prefix, dotfiles }) {
if (reply.request.query.format === 'html' && typeof options.render !== 'function') {
throw new Error('The `list.render` option must be a function and is required with the URL parameter `format=html`')
throw new TypeError('The `list.render` option must be a function and is required with the URL parameter `format=html`')
}
let entries
@@ -125,9 +125,9 @@ const dirList = {
entries.dirs.forEach(entry => nameEntries.dirs.push(entry.name))
entries.files.forEach(entry => nameEntries.files.push(entry.name))
reply.send(nameEntries)
await reply.send(nameEntries)
} else {
reply.send(entries)
await reply.send(entries)
}
return
}
@@ -135,7 +135,7 @@ const dirList = {
const html = options.render(
entries.dirs.map(entry => dirList.htmlInfo(entry, route, prefix, options)),
entries.files.map(entry => dirList.htmlInfo(entry, route, prefix, options)))
reply.type('text/html').send(html)
await reply.type('text/html').send(html)
},
/**