feat: add media API routes #88

Merged
erik merged 1 commit from feat/task-d520567e-media-api-routes into main 2026-06-03 21:51:38 -05:00
Owner

Summary

Implement authenticated media upload, metadata lookup, and deletion routes backed by the existing media storage service and SQLite metadata.

Task

#task-d520567e

Changes

  • Add /api/v1/media upload and /api/v1/media/{id} get/delete routes
  • Wire media routes to injectable S3-compatible storage/config and existing SQLite media metadata service
  • Add shared media error responses for validation, not found, storage, oversized upload, and unsupported MIME type failures
  • Document media routes and schemas in OpenAPI with spec operation IDs
  • Add media API route tests and OpenAPI coverage

Testing

  • Unit tests added/updated
  • Manual testing performed

Checklist

  • ./scripts/pre-pr.sh passes
  • Documentation updated (OpenAPI)
  • No unrelated changes included
## Summary Implement authenticated media upload, metadata lookup, and deletion routes backed by the existing media storage service and SQLite metadata. ## Task #task-d520567e ## Changes - Add `/api/v1/media` upload and `/api/v1/media/{id}` get/delete routes - Wire media routes to injectable S3-compatible storage/config and existing SQLite media metadata service - Add shared media error responses for validation, not found, storage, oversized upload, and unsupported MIME type failures - Document media routes and schemas in OpenAPI with spec operation IDs - Add media API route tests and OpenAPI coverage ## Testing - [x] Unit tests added/updated - [ ] Manual testing performed ## Checklist - [x] `./scripts/pre-pr.sh` passes - [x] Documentation updated (OpenAPI) - [x] No unrelated changes included
feat: add media API routes
All checks were successful
CI / build-lint-test (pull_request) Successful in 34s
553e3a498b
Task: #task-d520567e
Author
Owner

PR Review

Summary

Reviewed PR #88 against task task-d520567e and docs/specs/07-media-routes.md. The PR adds authenticated media upload, get, and delete routes wired to the existing media storage service, SQLite metadata, shared error shapes, OpenAPI docs, and tests.

Acceptance criteria

  • Can upload media through /api/v1/media as documented.
  • Upload creates storage object and database record.
  • Response includes the documented media metadata and public URL.
  • Can delete media through the documented route.
  • Unsupported type and oversized uploads fail with shared error responses.
  • Every media route appears in OpenAPI with documented operation IDs.
  • Relevant lint/test checks pass.

Blocking issues

None.

Warnings

None.

Verification

  • ./scripts/pre-pr.sh passed locally.
  • Forgejo CI status for CI / build-lint-test (pull_request) is success.

Verdict

Approved. Ready for human merge approval.

## PR Review ### Summary Reviewed PR #88 against task `task-d520567e` and `docs/specs/07-media-routes.md`. The PR adds authenticated media upload, get, and delete routes wired to the existing media storage service, SQLite metadata, shared error shapes, OpenAPI docs, and tests. ### Acceptance criteria - [x] Can upload media through `/api/v1/media` as documented. - [x] Upload creates storage object and database record. - [x] Response includes the documented media metadata and public URL. - [x] Can delete media through the documented route. - [x] Unsupported type and oversized uploads fail with shared error responses. - [x] Every media route appears in OpenAPI with documented operation IDs. - [x] Relevant lint/test checks pass. ### Blocking issues None. ### Warnings None. ### Verification - `./scripts/pre-pr.sh` passed locally. - Forgejo CI status for `CI / build-lint-test (pull_request)` is `success`. ### Verdict Approved. Ready for human merge approval.
erik merged commit 952deb6b84 into main 2026-06-03 21:51:38 -05:00
erik deleted branch feat/task-d520567e-media-api-routes 2026-06-03 21:51:38 -05:00
Sign in to join this conversation.
No description provided.