diff --git a/server/api/artists.ts b/server/api/artists.ts index 7e1e6d2..62e861b 100644 --- a/server/api/artists.ts +++ b/server/api/artists.ts @@ -1,3 +1,5 @@ +import { eventHandler } from 'h3' + export default eventHandler(() => { return [ { diff --git a/server/api/compilations.ts b/server/api/compilations.ts index 90b6aea..d021503 100644 --- a/server/api/compilations.ts +++ b/server/api/compilations.ts @@ -1,3 +1,5 @@ +import { eventHandler } from 'h3' + export default eventHandler(() => { return [ { diff --git a/server/api/playlists/[id].ts b/server/api/playlists/[id].ts index c72f80d..46a9cc1 100644 --- a/server/api/playlists/[id].ts +++ b/server/api/playlists/[id].ts @@ -1,5 +1,6 @@ import fs from 'fs' import path from 'path' +import { eventHandler } from 'h3' export default eventHandler(async (event) => { const id = event.context.params?.id || '' diff --git a/server/api/playlists/index.ts b/server/api/playlists/index.ts index 20ef77f..cd0d0c1 100644 --- a/server/api/playlists/index.ts +++ b/server/api/playlists/index.ts @@ -1,5 +1,6 @@ import fs from 'fs' import path from 'path' +import { eventHandler } from 'h3' export default eventHandler(async (event) => { const directoryPath = path.join(process.cwd(), 'media/files/music') diff --git a/server/api/tracks.ts b/server/api/tracks.ts index a7bb894..2c527e3 100644 --- a/server/api/tracks.ts +++ b/server/api/tracks.ts @@ -1,3 +1,5 @@ +import { eventHandler } from 'h3' + export default eventHandler(() => { return [ {