Skip to content

Commit

Permalink
[Ingest Manager] Return ID when default output is found (elastic#75930)
Browse files Browse the repository at this point in the history
* Return ID when default output is found

* Fix typing
  • Loading branch information
jen-huang committed Aug 26, 2020
1 parent 3874c62 commit 983e7b2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion x-pack/plugins/ingest_manager/server/services/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let cachedAdminUser: null | { username: string; password: string } = null;

class OutputService {
public async getDefaultOutput(soClient: SavedObjectsClientContract) {
return await soClient.find<Output>({
return await soClient.find<OutputSOAttributes>({
type: OUTPUT_SAVED_OBJECT_TYPE,
searchFields: ['is_default'],
search: 'true',
Expand All @@ -42,6 +42,7 @@ class OutputService {
}

return {
id: outputs.saved_objects[0].id,
...outputs.saved_objects[0].attributes,
};
}
Expand Down

0 comments on commit 983e7b2

Please sign in to comment.