lint code

This commit is contained in:
2025-04-14 12:36:04 +02:00
parent 2298c1c115
commit 0db5831116
20 changed files with 1128 additions and 548 deletions

View File

@@ -7,7 +7,7 @@ export default eventHandler(async (event) => {
const stream = await hubBlob().serve(event, `chats/${pathname}.json`)
if (!(stream instanceof ReadableStream)) {
throw new Error('Le stream n\'est pas valide')
throw new TypeError('Le stream n\'est pas valide')
}
const read = await streamToText(stream)

View File

@@ -8,11 +8,11 @@ export default eventHandler(async (event) => {
ensureBlob(file, {
maxSize: '1MB',
types: ['application/jsonml+json', 'application/json']
types: ['application/jsonml+json', 'application/json'],
})
return hubBlob().put(file.name, file, {
addRandomSuffix: false,
prefix: 'chats'
prefix: 'chats',
})
})