-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmanagerRoutes.js
37 lines (28 loc) · 926 Bytes
/
managerRoutes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
const { getAvailableBundleDeals, applyDeal, editProduct, createProduct, getProducts_1, getAvailableDeals, deleteProduct, clearActiveDeals } = require('./controllers/ManagerController');
const express = require('express');
const router = express.Router();
router.put('/editProduct', (req, res) => {
editProduct(req, res)
});
router.post('/createProduct', (req, res) => {
createProduct(req, res)
});
router.post('/applyDeal', (req, res) => {
applyDeal(req, res)
});
router.get('/getProducts', (req, res) => {
getProducts_1(req, res)
});
router.get('/availableDeals', (req, res) => {
getAvailableDeals(req, res)
});
router.get('/availableBundleDeals', (req, res) => {
getAvailableBundleDeals(req, res)
});
router.delete('/deleteProduct', (req, res) => {
deleteProduct(req, res)
});
router.delete('/clearActiveDeals', (req, res) => {
clearActiveDeals(req, res)
});
module.exports = router;