Skip to content

Commit

Permalink
Cleanup pt2
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Jul 21, 2020
1 parent 350ee45 commit 8d8e499
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@
*/

import { curry } from 'lodash';
import { schema, TypeOf } from '@kbn/config-schema';
import { schema } from '@kbn/config-schema';

import { validate } from './validators';
import {
ExternalIncidentServiceConfiguration,
ExternalIncidentServiceConfigurationSchema,
ExternalIncidentServiceSecretConfiguration,
ExecutorParamsSchema,
} from './schema';
Expand Down Expand Up @@ -97,9 +96,7 @@ async function executor(
const pushToServiceParams = subActionParams as ExecutorSubActionPushParams;

const { comments, externalId, ...restParams } = pushToServiceParams;
const incidentConfiguration = (config as TypeOf<
typeof ExternalIncidentServiceConfigurationSchema
>).incidentConfiguration;
const incidentConfiguration = config.incidentConfiguration;
const mapping = incidentConfiguration ? buildMap(incidentConfiguration.mapping) : null;
const externalObject =
config.incidentConfiguration && mapping ? mapParams(restParams, mapping) : {};
Expand Down

0 comments on commit 8d8e499

Please sign in to comment.