fix: resolve TypeScript syntax error in music routes - use spread operator instead of invalid 'as string[]' syntax
This commit is contained in:
parent
e4ee7230d1
commit
a49e628d93
@ -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' });
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user