Skip to content

Commit

Permalink
fix: add field validation for anomaly detector results (#1126)
Browse files Browse the repository at this point in the history
Signed-off-by: Laurin Heilmeyer <[email protected]>
  • Loading branch information
heilmela committed Jan 23, 2025
1 parent 9a90b8f commit 37aa052
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 37aa052

Please sign in to comment.