From 3a60e65f7573a6dcb0f9df834fa89598082db6a2 Mon Sep 17 00:00:00 2001 From: EduardPrigoana <182119792+EduardPrigoana@users.noreply.github.com> Date: Wed, 11 Feb 2026 06:51:52 +0000 Subject: [PATCH] style: auto-fix linting issues --- qobuz-api/download-music/route.ts | 4 ++-- qobuz-api/get-album/route.ts | 4 ++-- qobuz-api/get-artist/route.ts | 4 ++-- qobuz-api/get-countries/route.ts | 6 +++--- qobuz-api/get-music/route.ts | 7 +++++-- qobuz-api/get-releases/route.ts | 13 ++++++++++--- 6 files changed, 24 insertions(+), 14 deletions(-) diff --git a/qobuz-api/download-music/route.ts b/qobuz-api/download-music/route.ts index c5c0075..5ba925c 100644 --- a/qobuz-api/download-music/route.ts +++ b/qobuz-api/download-music/route.ts @@ -4,7 +4,7 @@ import z from 'zod'; const downloadParamsSchema = z.object({ track_id: z.preprocess((a) => parseInt(a as string), z.number().min(0, 'ID must be 0 or greater').default(1)), - quality: z.enum(['27', '7', '6', '5']).default('27') + quality: z.enum(['27', '7', '6', '5']).default('27'), }); export async function GET(request: NextRequest) { @@ -18,7 +18,7 @@ export async function GET(request: NextRequest) { return new NextResponse( JSON.stringify({ success: false, - error: error?.errors || error.message || 'An error occurred parsing the request.' + error: error?.errors || error.message || 'An error occurred parsing the request.', }), { status: 400 } ); diff --git a/qobuz-api/get-album/route.ts b/qobuz-api/get-album/route.ts index 6ac51b6..7d95164 100644 --- a/qobuz-api/get-album/route.ts +++ b/qobuz-api/get-album/route.ts @@ -3,7 +3,7 @@ import { getAlbumInfo } from '@/lib/qobuz-dl-server'; import z from 'zod'; const albumInfoParamsSchema = z.object({ - album_id: z.string().min(1, 'ID is required') + album_id: z.string().min(1, 'ID is required'), }); export async function GET(request: NextRequest) { @@ -17,7 +17,7 @@ export async function GET(request: NextRequest) { return new NextResponse( JSON.stringify({ success: false, - error: error?.errors || error.message || 'An error occurred parsing the request.' + error: error?.errors || error.message || 'An error occurred parsing the request.', }), { status: 400 } ); diff --git a/qobuz-api/get-artist/route.ts b/qobuz-api/get-artist/route.ts index d9d5bb3..c0db1d8 100644 --- a/qobuz-api/get-artist/route.ts +++ b/qobuz-api/get-artist/route.ts @@ -2,7 +2,7 @@ import { getArtist } from '@/lib/qobuz-dl-server'; import z from 'zod'; const artistReleasesParamsSchema = z.object({ - artist_id: z.string().min(1, 'ID is required') + artist_id: z.string().min(1, 'ID is required'), }); export async function GET(request: Request) { @@ -16,7 +16,7 @@ export async function GET(request: Request) { return new Response( JSON.stringify({ success: false, - error: error?.errors || error.message || 'An error occurred parsing the request.' + error: error?.errors || error.message || 'An error occurred parsing the request.', }), { status: 400 } ); diff --git a/qobuz-api/get-countries/route.ts b/qobuz-api/get-countries/route.ts index c8bdab9..b665b8e 100644 --- a/qobuz-api/get-countries/route.ts +++ b/qobuz-api/get-countries/route.ts @@ -6,7 +6,7 @@ export async function GET() { return new NextResponse( JSON.stringify({ success: false, - error: 'No countries list found' + error: 'No countries list found', }) ); } @@ -15,14 +15,14 @@ export async function GET() { return new NextResponse( JSON.stringify({ success: true, - data: countryCodes + data: countryCodes, }) ); } catch { return new NextResponse( JSON.stringify({ success: false, - error: 'Error parsing the countries list' + error: 'Error parsing the countries list', }) ); } diff --git a/qobuz-api/get-music/route.ts b/qobuz-api/get-music/route.ts index ff56a37..8d6ecf6 100644 --- a/qobuz-api/get-music/route.ts +++ b/qobuz-api/get-music/route.ts @@ -4,7 +4,10 @@ import z from 'zod'; const searchParamsSchema = z.object({ q: z.string().min(1, 'Query is required'), - offset: z.preprocess((a) => parseInt(a as string), z.number().max(1000, 'Offset must be less than 1000').min(0, 'Offset must be 0 or greater').default(0)) + offset: z.preprocess( + (a) => parseInt(a as string), + z.number().max(1000, 'Offset must be less than 1000').min(0, 'Offset must be 0 or greater').default(0) + ), }); export async function GET(request: NextRequest) { @@ -18,7 +21,7 @@ export async function GET(request: NextRequest) { return new NextResponse( JSON.stringify({ success: false, - error: error?.errors || error.message || 'An error occurred parsing the request.' + error: error?.errors || error.message || 'An error occurred parsing the request.', }), { status: 400 } ); diff --git a/qobuz-api/get-releases/route.ts b/qobuz-api/get-releases/route.ts index 9167247..f6394ee 100644 --- a/qobuz-api/get-releases/route.ts +++ b/qobuz-api/get-releases/route.ts @@ -7,7 +7,7 @@ const releasesParamsSchema = z.object({ release_type: z.enum(['album', 'live', 'compilation', 'epSingle', 'download']).default('album'), track_size: z.number().positive().default(1000), offset: z.preprocess((a) => parseInt(a as string), z.number().positive().default(0)), - limit: z.preprocess((a) => parseInt(a as string), z.number().positive().default(10)) + limit: z.preprocess((a) => parseInt(a as string), z.number().positive().default(10)), }); export async function GET(request: NextRequest) { @@ -15,13 +15,20 @@ export async function GET(request: NextRequest) { const params = Object.fromEntries(new URL(request.url).searchParams.entries()); try { const { artist_id, release_type, track_size, offset, limit } = releasesParamsSchema.parse(params); - const data = await getArtistReleases(artist_id, release_type, limit, offset, track_size, country ? { country } : {}); + const data = await getArtistReleases( + artist_id, + release_type, + limit, + offset, + track_size, + country ? { country } : {} + ); return new NextResponse(JSON.stringify({ success: true, data }), { status: 200 }); } catch (error: any) { return new NextResponse( JSON.stringify({ success: false, - error: error?.errors || error.message || 'An error occurred parsing the request.' + error: error?.errors || error.message || 'An error occurred parsing the request.', }), { status: 400 } );