Skip to content

Commit

Permalink
[ResponseOps][Rules] Remove unintended internal Find routes API with …
Browse files Browse the repository at this point in the history
…public access
  • Loading branch information
Zacqary committed Sep 18, 2024
1 parent 70b7d26 commit 8e116ea
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { IRouter } from '@kbn/core/server';
import { IRouter, RouteConfigOptions, RouteMethod } from '@kbn/core/server';
import { UsageCounter } from '@kbn/usage-collection-plugin/server';
import { ILicenseState } from '../../../../lib';
import { verifyAccessAndContext } from '../../../lib';
Expand All @@ -29,6 +29,7 @@ interface BuildFindRulesRouteParams {
router: IRouter<AlertingRequestHandlerContext>;
excludeFromPublicApi?: boolean;
usageCounter?: UsageCounter;
options?: RouteConfigOptions<RouteMethod>;
}

const buildFindRulesRoute = ({
Expand All @@ -37,15 +38,12 @@ const buildFindRulesRoute = ({
router,
excludeFromPublicApi = false,
usageCounter,
options: routerOptions,
}: BuildFindRulesRouteParams) => {
router.get(
{
path,
options: {
access: 'public',
summary: 'Get information about rules',
tags: ['oas-tag:alerting'],
},
options: routerOptions,
validate: {
request: {
query: findRulesRequestQuerySchemaV1,
Expand Down Expand Up @@ -162,6 +160,11 @@ export const findRulesRoute = (
path: `${BASE_ALERTING_API_PATH}/rules/_find`,
router,
usageCounter,
options: {
access: 'public',
summary: 'Get information about rules',
tags: ['oas-tag:alerting'],
},
});
};

Expand Down

0 comments on commit 8e116ea

Please sign in to comment.