From df8ab8735bcad64fc76e624940a0538681760775 Mon Sep 17 00:00:00 2001 From: Mateja Date: Thu, 15 Jul 2021 22:51:08 +0200 Subject: Setup transaction routes. --- server/routes/api.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'server/routes') 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; -- cgit v1.2.3