diff --git a/app/api/apks/route.ts b/app/api/apks/route.ts index f004760..7196ec1 100644 --- a/app/api/apks/route.ts +++ b/app/api/apks/route.ts @@ -1,6 +1,6 @@ // app/api/apks/route.ts import { NextResponse } from 'next/server'; -import { getApks, formatDateTime } from '@/lib/fs-utils'; +import { getApks } from '@/lib/fs-utils'; export async function GET(request: Request) { const { searchParams } = new URL(request.url); @@ -20,7 +20,7 @@ export async function GET(request: Request) { const apksWithUrls = apks.map(apk => ({ ...apk, modifiedAt: apk.modifiedAt.toISOString(), - downloadUrl: `/api/download?project=${project}&version=${version}&filename=${apk.name}`, + downloadUrl: `/api/download?project=${encodeURIComponent(project)}&version=${encodeURIComponent(version)}&filename=${encodeURIComponent(apk.name)}`, })); return NextResponse.json(apksWithUrls); } catch (error) {