Skip to content

Add GET /library/scan/batch endpoint to list batch jobs#217

Draft
jakebromberg wants to merge 1 commit intofeature/scanner-batch-processingfrom
feature/scanner-list-batch-jobs
Draft

Add GET /library/scan/batch endpoint to list batch jobs#217
jakebromberg wants to merge 1 commit intofeature/scanner-batch-processingfrom
feature/scanner-list-batch-jobs

Conversation

@jakebromberg
Copy link
Member

@jakebromberg jakebromberg commented Mar 2, 2026

Summary

  • Add listJobs(userId, limit, offset) service function with pagination and total count
  • Add listBatchJobs controller handler with query param parsing (limit default 20, max 100)
  • Register GET /batch route before :jobId param route

Test plan

  • 4 service tests: empty result, sorted order, limit/offset, field mapping
  • 3 controller tests: 200 response, default pagination, limit clamping
  • Manual: verify endpoint returns correct results with real database

Closes #216

Note: Depends on #215 (batch processing), which depends on #213 (Gemini scanner).

Add listJobs service function that queries scan_jobs for a user with limit/offset pagination and total count. Add listBatchJobs controller handler that parses query params with defaults (limit=20, max=100, offset=0). Register the route before the :jobId param route so Express matches it first.

7 new tests: 4 service (empty result, sorted order, limit/offset, field mapping) + 3 controller (200 response, default pagination, limit clamping).
@jakebromberg jakebromberg force-pushed the feature/scanner-list-batch-jobs branch from 3b1e8d5 to ffc0c20 Compare March 5, 2026 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant