([FromQuery] QueryParams body, CancellationToken cancellationToken)
| 264 | } |
| 265 | |
| 266 | [HttpGet("/api/_stats/metrics")] |
| 267 | public async Task<IActionResult> KeyMetrics([FromQuery] QueryParams body, CancellationToken cancellationToken) |
| 268 | { |
| 269 | var currentQuery = body.Parse(); |
| 270 | var current = GetKeyMetrics(currentQuery, cancellationToken); |
| 271 | |
| 272 | if (!currentQuery.DateFrom.HasValue || !currentQuery.DateTo.HasValue) { |
| 273 | return Ok(new KeyMetrics(await current)); |
| 274 | } |
| 275 | |
| 276 | var previousQuery = currentQuery.CloneToPreviousInterval(); |
| 277 | var previous = await GetKeyMetrics(previousQuery, cancellationToken); |
| 278 | return Ok(new KeyMetrics(await current, previous)); |
| 279 | } |
| 280 | |
| 281 | [HttpGet("/api/_stats/periodic")] |
| 282 | public async Task<IActionResult> PeriodicStats([FromQuery] QueryParams body, CancellationToken cancellationToken) |
nothing calls this directly
no test coverage detected