File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
samples/unpeelingOnion/src/unpeeled/ecommerce/shoppingCarts
getCustomerShoppingHistory Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ import { Collection } from 'mongodb';
44import { ShoppingCartModel } from '../storage/' ;
55import { getById } from '#core/mongo' ;
66
7- export const getShoppingCartByIdRouter = (
7+ export const getShoppingCartByIdRoute = (
88 carts : Collection < ShoppingCartModel > ,
99 router : Router
1010) =>
Original file line number Diff line number Diff line change @@ -4,12 +4,12 @@ import { Collection } from 'mongodb';
44import { ShoppingCartModel } from '../storage/' ;
55import { 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 ) ;
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import { Router } from 'express';
44import { MongoClient } from 'mongodb' ;
55import { addProductItemToShoppingCartRoute } from './addProductItem/route' ;
66import { confirmShoppingCartRoute } from './confirm/route' ;
7+ import { getShoppingCartByIdRoute } from './getById/route' ;
8+ import { getCustomerShoppingHistoryRoute } from './getCustomerShoppingHistory/route' ;
79import { openShoppingCartRoute } from './open/route' ;
810import { removeProductItemFromShoppingCartRoute } from './removeProductItem/route' ;
911import { 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} ;
You can’t perform that action at this time.
0 commit comments