chizy7 / chizy7/PinnacleMM

Use query parameters in the performance REST endpoints

Open
#75 1 comment 0 reactions 1 assignee Claimed by @OoreFasawe View on GitHub
enhancement good first issue help wanted
Dominant language
C++
Stars
14
Forks
12
Avg merge
1h 27m
Merged PRs (30d)
3

Description

## Context

PR #72 fixed REST API routing so URLs with query strings resolve correctly, and it implemented `parseQueryString` (a free function in `visualization/WebServer.h`) with unit tests. What it deliberately left out, per the review discussion, is actually consuming the parsed values: `handleGetPerformance` still opens with `boost::ignore_unused(query)`, and `handleGetChartData` does the same. So a request like `/api/v1/strategies//performance?start=100&end=500` routes correctly but returns the same data regardless of the parameters.

## What to do

- Call `parseQueryString` in `handleGetPerformance` and honor the relevant parameters (for example `start` and `end` as timestamp bounds, and possibly `limit`).
- Do the same for `handleGetChartData`, which currently hardcodes a 1 hour time range where a `range` or `start`/`end` parameter would fit naturally.
- Ignore unknown parameters and fall back to current behavior when none are given, so existing dashboard calls keep working.
- Add unit tests for the parameter handling.

## Notes

The review of PR #72 also removed a routing-level test (`RoutesPerformanceRequestsWithQueryStrings`) because it needed private access to `handleRequest`. If this work adds a public seam for handler behavior, that is a good opportunity to restore integration-level coverage for routing with query strings.

Refs: #72

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.