aboutsummaryrefslogtreecommitdiff
path: root/server/routes
diff options
context:
space:
mode:
authorMateja <mail@matejamaric.com>2021-07-15 22:51:08 +0200
committerMateja <mail@matejamaric.com>2021-07-15 22:51:08 +0200
commitdf8ab8735bcad64fc76e624940a0538681760775 (patch)
treef903a4c195d620f238e0d7362b0c1acc029054c4 /server/routes
parent1b04c332c2562f52c11ca653c4cd55f4c24548e5 (diff)
downloadmevn-ecommerce-df8ab8735bcad64fc76e624940a0538681760775.tar.gz
mevn-ecommerce-df8ab8735bcad64fc76e624940a0538681760775.zip
Setup transaction routes.
Diffstat (limited to 'server/routes')
-rw-r--r--server/routes/api.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/routes/api.js b/server/routes/api.js
index 33885c9..c48e169 100644
--- a/server/routes/api.js
+++ b/server/routes/api.js
@@ -3,6 +3,7 @@ const router = express.Router();
const userController = require('../controllers/user');
const productsController = require('../controllers/products');
+const transactionController = require('../controllers/transaction');
const {isAuth, isAdmin, upload} = require('../lib/middleware');
@@ -16,4 +17,7 @@ router.post('/products', isAuth, isAdmin, upload.single('image'), productsContro
router.patch('/products/:id', isAuth, isAdmin, upload.single('image'), productsController.update);
router.delete('/products/:id', isAuth, isAdmin, productsController.destroy);
+router.post('/transaction/setup', isAuth, transactionController.setup);
+router.get('/transaction/capture', transactionController.capture);
+
module.exports = router;