Skip to content

Commit

Permalink
rename API endpoint to /stats
Browse files Browse the repository at this point in the history
  • Loading branch information
paul-tavares committed Jan 6, 2021
1 parent d4e9dd9 commit 6da3349
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/common/constants/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const EPM_API_ROUTES = {
DELETE_PATTERN: EPM_PACKAGES_ONE,
FILEPATH_PATTERN: `${EPM_PACKAGES_FILE}/{filePath*}`,
CATEGORIES_PATTERN: `${EPM_API_ROOT}/categories`,
SUMMARY_PATTERN: `${EPM_PACKAGES_MANY}/{pkgName}/summary`,
STATS_PATTERN: `${EPM_PACKAGES_MANY}/{pkgName}/stats`,
};

// Data stream API routes
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/common/services/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export const epmRouteService = {
},

getSummaryPath: (pkgName: string) => {
return EPM_API_ROUTES.SUMMARY_PATTERN.replace('{pkgName}', pkgName);
return EPM_API_ROUTES.STATS_PATTERN.replace('{pkgName}', pkgName);
},

getFilePath: (filePath: string) => {
Expand Down
2 changes: 1 addition & 1 deletion x-pack/plugins/fleet/server/routes/epm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const registerRoutes = (router: IRouter) => {

router.get(
{
path: EPM_API_ROUTES.SUMMARY_PATTERN,
path: EPM_API_ROUTES.STATS_PATTERN,
validate: GetSummaryRequestSchema,
options: { tags: [`access:${PLUGIN_ID}`] },
},
Expand Down

0 comments on commit 6da3349

Please sign in to comment.