fix: resolve TypeScript syntax error in music routes - use spread operator instead of invalid 'as string[]' syntax

This commit is contained in:
Geert Rademakes 2025-08-14 09:08:50 +02:00
parent e4ee7230d1
commit a49e628d93

View File

@ -227,7 +227,7 @@ router.get('/folders', async (req, res) => {
try {
const folders = await s3Service.listAllFolders('');
// Include root option as empty string
res.json({ folders: [''] as string[] .concat(folders) });
res.json({ folders: ['', ...folders] });
} catch (error) {
console.error('Error fetching S3 folders:', error);
res.status(500).json({ error: 'Failed to fetch S3 folders' });