aboutsummaryrefslogtreecommitdiff
path: root/server/routes
diff options
context:
space:
mode:
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;