Skip to content

Commit

Permalink
[Workplace Search] Consolidate groups routes (#83015)
Browse files Browse the repository at this point in the history
* [Workplace Search] Consolidate groups routes

This PR consolidates all of the groups route resgistration functions into a single export so that the `registerWorkplaceSearchRoutes` function only has to call the top-level routes

* Remove redundant test
  • Loading branch information
scottybollinger authored Nov 10, 2020
1 parent 4dba10c commit 8ff92f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -223,3 +223,13 @@ export function registerBoostsGroupRoute({
}
);
}

export const registerGroupsRoutes = (dependencies: IRouteDependencies) => {
registerGroupsRoute(dependencies);
registerSearchGroupsRoute(dependencies);
registerGroupRoute(dependencies);
registerGroupUsersRoute(dependencies);
registerShareGroupRoute(dependencies);
registerAssignGroupRoute(dependencies);
registerBoostsGroupRoute(dependencies);
};
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,9 @@
import { IRouteDependencies } from '../../plugin';

import { registerOverviewRoute } from './overview';
import {
registerGroupsRoute,
registerSearchGroupsRoute,
registerGroupRoute,
registerGroupUsersRoute,
registerShareGroupRoute,
registerAssignGroupRoute,
registerBoostsGroupRoute,
} from './groups';
import { registerGroupsRoutes } from './groups';

export const registerWorkplaceSearchRoutes = (dependencies: IRouteDependencies) => {
registerOverviewRoute(dependencies);
registerGroupsRoute(dependencies);
registerSearchGroupsRoute(dependencies);
registerGroupRoute(dependencies);
registerGroupUsersRoute(dependencies);
registerShareGroupRoute(dependencies);
registerAssignGroupRoute(dependencies);
registerBoostsGroupRoute(dependencies);
registerGroupsRoutes(dependencies);
};

0 comments on commit 8ff92f2

Please sign in to comment.