fix: resolve duplicate commit field and add commitId filter test

- Replace spread operator with explicit field selection to avoid
  duplicate commit field from getApks() and parseApkFilename()
- Add test case for commitId parameter filtering to ensure
  the filter parameter works correctly with new metadata extraction

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 21:32:01 +08:00
parent 792ad8619c
commit e217d1c6c9
2 changed files with 50 additions and 1 deletions

View File

@@ -21,7 +21,8 @@ export async function GET(request: Request) {
const apksWithMetadata = apks.map(apk => {
const parsed = parseApkFilename(apk.name);
return {
...apk,
name: apk.name,
size: apk.size,
environment: parsed.environment,
commit: parsed.commit,
modifiedAt: apk.modifiedAt.toISOString(),