Skip to content

Add GET /quotes/random endpoint #4

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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