Skip to content

Commit

Permalink
Adapt to new source config getter signature
Browse files Browse the repository at this point in the history
  • Loading branch information
weltenwort committed Apr 27, 2020
1 parent e7c0806 commit 8cc81b5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions x-pack/plugins/infra/server/routes/log_sources/configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ export const initLogSourceConfigurationRoutes = ({ framework, sources }: InfraBa
const { sourceId } = request.params;

try {
const sourceConfiguration = await sources.getSourceConfiguration(requestContext, sourceId);
const sourceConfiguration = await sources.getSourceConfiguration(
requestContext.core.savedObjects.client,
sourceId
);

return response.ok({
body: getLogSourceConfigurationSuccessResponsePayloadRT.encode({
Expand Down Expand Up @@ -65,7 +68,10 @@ export const initLogSourceConfigurationRoutes = ({ framework, sources }: InfraBa
const { data: patchedSourceConfigurationProperties } = request.body;

try {
const sourceConfiguration = await sources.getSourceConfiguration(requestContext, sourceId);
const sourceConfiguration = await sources.getSourceConfiguration(
requestContext.core.savedObjects.client,
sourceId
);

if (sourceConfiguration.origin === 'internal') {
response.conflict({
Expand Down

0 comments on commit 8cc81b5

Please sign in to comment.