first 3D model
All checks were successful
Deploy App / deploy (push) Successful in 1m18s

This commit is contained in:
valere
2025-09-17 23:39:43 +02:00
parent 116d15d1ce
commit 0c1cf30996
28 changed files with 1384 additions and 63 deletions

View File

@@ -0,0 +1,21 @@
import fs from 'fs'
import path from 'path'
export default eventHandler(async (event) => {
const directoryPath = path.join(process.cwd(), 'media/files/music')
try {
// Read the directory contents
const files = await fs.promises.readdir(directoryPath)
return {
success: true,
files: files.filter(file => !file.startsWith('.')).reverse() // exclude unwanted files
}
} catch (error) {
return {
success: false,
error: error.message
}
}
})