Skip to content

Commit

Permalink
feat: implement create promotion route
Browse files Browse the repository at this point in the history
  • Loading branch information
riyoneri committed Nov 19, 2024
1 parent 5b7a349 commit b46aad7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/controllers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export * as userAuthController from "./user-auth.controller";
export * as clientsController from "./admin/clients.controller";
export * as categoriesController from "./admin/categories.controller";
export * as productsController from "./admin/products.controller";
export * as promotionController from "./admin/promotion.controller";
8 changes: 8 additions & 0 deletions src/routes/admin.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
categoriesController,
clientsController,
productsController,
promotionController,
} from "../controllers";
import {
adminAuthMiddleware,
Expand All @@ -13,6 +14,7 @@ import {
import {
createCategoryChain,
createProductChain,
createPromotion,
deleteCategoryChain,
deleteProductChain,
getAllSanitizer,
Expand Down Expand Up @@ -89,4 +91,10 @@ router
productsController.deleteProduct,
);

router.post(
"/promotions",
createPromotion(),
promotionController.createPromotion,
);

export default router;

0 comments on commit b46aad7

Please sign in to comment.