From 16813bf1de774c2b09024166a8b879dc75f96bfb Mon Sep 17 00:00:00 2001 From: valere Date: Thu, 18 Sep 2025 12:58:10 +0200 Subject: [PATCH] server fix: import eventHandler --- server/api/artists.ts | 2 ++ server/api/compilations.ts | 2 ++ server/api/playlists/[id].ts | 1 + server/api/playlists/index.ts | 1 + server/api/tracks.ts | 2 ++ 5 files changed, 8 insertions(+) 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 [ {