Skip to content

Commit

Permalink
fix: add field validation for anomaly detector results (#1126) (#1194)
Browse files Browse the repository at this point in the history
Signed-off-by: Laurin Heilmeyer <[email protected]>
Co-authored-by: Laurin Heilmeyer <[email protected]>
(cherry picked from commit eb8a099)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
github-actions[bot] and Laurin Heilmeyer committed Feb 12, 2025
1 parent 64ad4fe commit 61a452e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/routes/anomalyDetector.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default function (services, router, dataSourceEnabled) {
params: schema.object({
detectorId: schema.string(),
}),
query: createValidateQuerySchema(dataSourceEnabled),
query: createValidateQuerySchema(dataSourceEnabled, {
startTime: schema.maybe(schema.number()),
endTime: schema.maybe(schema.number()),
preview: schema.maybe(schema.boolean()),
}),
},
},
anomalyDetectorService.getDetectorResults
Expand Down

0 comments on commit 61a452e

Please sign in to comment.