forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Watcher] Refactor to use client from
RequestHandlerContext
(elasti…
…c#57834) (elastic#58116) * Remove elasticsearch setup service from route deps Removed the callWithRequestFactory entirely. This setup was introducing a pattern where route handlers were not pulling the ES client fromt the route handler context. For this refactor we need to extend the route handler context with watcher specific client actions and so we also extend RequestHandlerContext globally. In this commit we also update the types for params, query and body schema on each route to avoid using any everwhere. * Add generic types to license wrapper Adding <P, Q, B> to the license wrapper made it a transparent wrapper from a type perspective so we can remove the need to eplicitly set RequestHandler<P, Q, B> on the handler. Also cleaned up a variable name "response" -> "searchResults" Also removed elasticsearch from the RouteDependencies type. Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
- Loading branch information
1 parent
0f41096
commit 6a65fe1
Showing
22 changed files
with
633 additions
and
648 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 0 additions & 28 deletions
28
x-pack/plugins/watcher/server/lib/call_with_request_factory.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.