Description
There's no way to see previously computed results. Add a /history endpoint that returns the last N calculations performed.
Proposed behavior
GET /history → returns last 10 calculations
GET /history?limit=5 → returns last 5
Response format:
[
{"operation": "add", "a": 2, "b": 3, "result": 5, "timestamp": "2026-06-01T12:00:00Z"},
{"operation": "multiply", "a": 4, "b": 5, "result": 20, "timestamp": "2026-06-01T12:01:00Z"}
]
Acceptance criteria
- Store calculations in memory (no database needed)
- Default limit of 10, max 100
- Include timestamp for each entry
Description
There's no way to see previously computed results. Add a
/historyendpoint that returns the last N calculations performed.Proposed behavior
Response format:
[ {"operation": "add", "a": 2, "b": 3, "result": 5, "timestamp": "2026-06-01T12:00:00Z"}, {"operation": "multiply", "a": 4, "b": 5, "result": 20, "timestamp": "2026-06-01T12:01:00Z"} ]Acceptance criteria