Skip to content

Commit

Permalink
Remove WS in route registrations since the main fn is already specific
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Nov 4, 2020
1 parent 68ffa68 commit 48019ca
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export function registerBoostsGroupRoute({
);
}

export function registerWSGroupRoutes(dependencies: IRouteDependencies) {
export function registerGroupRoutes(dependencies: IRouteDependencies) {
registerGroupsRoute(dependencies);
registerSearchGroupsRoute(dependencies);
registerGroupRoute(dependencies);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

import { IRouteDependencies } from '../../plugin';

import { registerWSOverviewRoute } from './overview';
import { registerWSGroupRoutes } from './groups';
import { registerOverviewRoute } from './overview';
import { registerGroupRoutes } from './groups';

export const registerWorkplaceSearchRoutes = (dependencies: IRouteDependencies) => {
registerWSOverviewRoute(dependencies);
registerWSGroupRoutes(dependencies);
registerOverviewRoute(dependencies);
registerGroupRoutes(dependencies);
};
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { MockRouter, mockRequestHandler, mockDependencies } from '../../__mocks__';

import { registerWSOverviewRoute } from './overview';
import { registerOverviewRoute } from './overview';

describe('Overview route', () => {
describe('GET /api/workplace_search/overview', () => {
Expand All @@ -16,7 +16,7 @@ describe('Overview route', () => {
jest.clearAllMocks();
mockRouter = new MockRouter({ method: 'get', payload: 'query' });

registerWSOverviewRoute({
registerOverviewRoute({
...mockDependencies,
router: mockRouter.router,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { IRouteDependencies } from '../../plugin';

export function registerWSOverviewRoute({
export function registerOverviewRoute({
router,
enterpriseSearchRequestHandler,
}: IRouteDependencies) {
Expand Down

0 comments on commit 48019ca

Please sign in to comment.