File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
x-pack/plugins/licensing/server/routes Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -19,5 +19,5 @@ export function registerRoutes(
1919 registerInfoRoute ( router ) ;
2020 registerFeatureUsageRoute ( router , getStartServices ) ;
2121 registerRegisterFeatureRoute ( router , featureUsageSetup ) ;
22- registerNotifyFeatureUsageRoute ( router , getStartServices ) ;
22+ registerNotifyFeatureUsageRoute ( router ) ;
2323}
Original file line number Diff line number Diff line change 44 * you may not use this file except in compliance with the Elastic License.
55 */
66import { schema } from '@kbn/config-schema' ;
7- import { IRouter , StartServicesAccessor } from 'src/core/server' ;
8- import { LicensingPluginStart } from '../../types' ;
7+ import { IRouter } from 'src/core/server' ;
98
10- export function registerNotifyFeatureUsageRoute (
11- router : IRouter ,
12- getStartServices : StartServicesAccessor < { } , LicensingPluginStart >
13- ) {
9+ export function registerNotifyFeatureUsageRoute ( router : IRouter ) {
1410 router . post (
1511 {
1612 path : '/internal/licensing/feature_usage/notify' ,
@@ -22,10 +18,9 @@ export function registerNotifyFeatureUsageRoute(
2218 } ,
2319 } ,
2420 async ( context , request , response ) => {
25- const [ , , { featureUsage } ] = await getStartServices ( ) ;
2621 const { featureName, lastUsed } = request . body ;
2722
28- featureUsage . notifyUsage ( featureName , lastUsed ) ;
23+ context . licensing . featureUsage . notifyUsage ( featureName , lastUsed ) ;
2924
3025 return response . ok ( {
3126 body : {
You can’t perform that action at this time.
0 commit comments