-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[Cases] Deprecate endpoints #124773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cases] Deprecate endpoints #124773
Changes from 14 commits
4100b52
0bdefb6
85d0e0c
15bb9d9
8e4a776
d4d8fe2
d59f1b9
7b6cf4f
84ef3b4
e63e3cf
3bebd6b
eb3c26a
4d293cc
1c81792
c17b0d2
07598ab
bac177c
62e5d01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,10 +8,13 @@ | |
| import { schema } from '@kbn/config-schema'; | ||
|
|
||
| import { RouteDeps } from '../types'; | ||
| import { wrapError } from '../utils'; | ||
| import { getWarningHeader, wrapError } from '../utils'; | ||
| import { CASE_USER_ACTIONS_URL } from '../../../../common/constants'; | ||
|
|
||
| export function initGetAllCaseUserActionsApi({ router, logger }: RouteDeps) { | ||
| /** | ||
| * @deprecated since version 8.1.0 | ||
| */ | ||
| export function initGetAllCaseUserActionsApi({ router, logger, kibanaVersion }: RouteDeps) { | ||
| router.get( | ||
| { | ||
| path: CASE_USER_ACTIONS_URL, | ||
|
|
@@ -27,10 +30,15 @@ export function initGetAllCaseUserActionsApi({ router, logger }: RouteDeps) { | |
| return response.badRequest({ body: 'RouteHandlerContext is not registered for cases' }); | ||
| } | ||
|
|
||
| logger.warn(`The get all cases user actions API '${CASE_USER_ACTIONS_URL}' is deprecated.`); | ||
|
||
|
|
||
| const casesClient = await context.cases.getCasesClient(); | ||
| const caseId = request.params.case_id; | ||
|
|
||
| return response.ok({ | ||
| headers: { | ||
| ...getWarningHeader(kibanaVersion), | ||
| }, | ||
| body: await casesClient.userActions.getAll({ caseId }), | ||
| }); | ||
| } catch (error) { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.