Skip to content

Commit

Permalink
address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
alisonelizabeth committed Apr 20, 2020
1 parent 9c48fdb commit 9f97dba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x-pack/plugins/ingest_pipelines/server/routes/api/delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@ import { API_BASE_PATH } from '../../../common/constants';
import { RouteDependencies } from '../../types';

const paramsSchema = schema.object({
nameOrNames: schema.string(),
names: schema.string(),
});

export const registerDeleteRoute = ({ router, license }: RouteDependencies): void => {
router.delete(
{
path: `${API_BASE_PATH}/{nameOrNames}`,
path: `${API_BASE_PATH}/{names}`,
validate: {
params: paramsSchema,
},
},
license.guardApiRoute(async (ctx, req, res) => {
const { callAsCurrentUser } = ctx.core.elasticsearch.dataClient;
const { nameOrNames } = req.params;
const pipelineNames = nameOrNames.split(',');
const { names } = req.params;
const pipelineNames = names.split(',');

const response: { itemsDeleted: string[]; errors: any[] } = {
itemsDeleted: [],
Expand Down

0 comments on commit 9f97dba

Please sign in to comment.