Skip to content

GET /library search ignores album_name query parameter #233

@jakebromberg

Description

@jakebromberg

The `GET /library` search endpoint accepts `album_title` as a query parameter, but the OpenAPI spec (`CatalogSearchParams` in `api.yaml`) and the dj-site frontend both send `album_name`. This means album searches are silently ignored — the backend only matches against `artist_name`, so searching for an album title like "Confield" returns artist-name fuzzy matches (Scofield, Sinfield) instead of the album itself.

Root cause

`AlbumQueryParams` in `library.controller.ts` defines the field as `album_title`, while `CatalogSearchParams` in `api.yaml` defines it as `album_name`. The frontend sends `album_name`, which Express ignores since it doesn't match any declared query param.

Fix

Rename `album_title` to `album_name` in `AlbumQueryParams` and update all references in the controller, integration tests, and test utilities to match the spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions