Skip to content

Commit beec969

Browse files
committed
Fixed missing routes
1 parent 6775fed commit beec969

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

samples/unpeelingOnion/src/unpeeled/ecommerce/shoppingCarts/getById/route.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { Collection } from 'mongodb';
44
import { ShoppingCartModel } from '../storage/';
55
import { getById } from '#core/mongo';
66

7-
export const getShoppingCartByIdRouter = (
7+
export const getShoppingCartByIdRoute = (
88
carts: Collection<ShoppingCartModel>,
99
router: Router
1010
) =>

samples/unpeelingOnion/src/unpeeled/ecommerce/shoppingCarts/getCustomerShoppingHistory/route.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ import { Collection } from 'mongodb';
44
import { ShoppingCartModel } from '../storage/';
55
import { findAllByCustomerId, GetCustomerShoppingHistory } from './handler';
66

7-
export const getCustomerShoppingHistoryRouter = (
7+
export const getCustomerShoppingHistoryRoute = (
88
carts: Collection<ShoppingCartModel>,
99
router: Router
1010
) =>
1111
router.get(
12-
'/customers/:customerId/shopping-carts/:shoppingCartId/',
12+
'/customers/:customerId/shopping-carts/',
1313
async (request: Request, response: Response, next: NextFunction) => {
1414
try {
1515
const query = from(request);

samples/unpeelingOnion/src/unpeeled/ecommerce/shoppingCarts/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { Router } from 'express';
44
import { MongoClient } from 'mongodb';
55
import { addProductItemToShoppingCartRoute } from './addProductItem/route';
66
import { confirmShoppingCartRoute } from './confirm/route';
7+
import { getShoppingCartByIdRoute } from './getById/route';
8+
import { getCustomerShoppingHistoryRoute } from './getCustomerShoppingHistory/route';
79
import { openShoppingCartRoute } from './open/route';
810
import { removeProductItemFromShoppingCartRoute } from './removeProductItem/route';
911
import { ShoppingCartModel } from './storage/';
@@ -26,6 +28,8 @@ export const configureShoppingCartsModule = (
2628
router
2729
);
2830
confirmShoppingCartRoute(shoppingCartsCollection, eventBus, router);
31+
getShoppingCartByIdRoute(shoppingCartsCollection, router);
32+
getCustomerShoppingHistoryRoute(shoppingCartsCollection, router);
2933

3034
return router;
3135
};

0 commit comments

Comments
 (0)