Skip to content

Add GET /quotes/random endpoint #4

@CMON1975

Description

@CMON1975

The frontend displays one quote per page. A /quotes/random endpoint allows the frontend to fetch a single random quote without client-side selection logic.

Implementation: add a get_random_quote function to db.rs using ORDER BY RANDOM() LIMIT 1, a corresponding handler in routes.rs, and tests in the existing test module. Follow TDD order: tests first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions