UPI token fix
This commit is contained in:
parent
c059e4d8bf
commit
3d96bba6c6
|
|
@ -1,42 +1,42 @@
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const router = express.Router();
|
const router = express.Router();
|
||||||
const transactionSyncController = require('../controllers/transactionSyncController');
|
const transactionSyncController = require('../controllers/transactionSyncController');
|
||||||
const { requireManager } = require('../middleware/auth');
|
const { authenticateToken, requireManager } = require('../middleware/auth');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @route POST /api/transaction-sync/sync
|
* @route POST /api/transaction-sync/sync
|
||||||
* @desc Sync PhonePe transactions for manager
|
* @desc Sync PhonePe transactions for manager
|
||||||
* @access Private (Managers only)
|
* @access Private (Managers only)
|
||||||
*/
|
*/
|
||||||
router.post('/sync', requireManager, transactionSyncController.syncTransactions);
|
router.post('/sync', authenticateToken, requireManager, transactionSyncController.syncTransactions);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @route GET /api/transaction-sync/review-queue
|
* @route GET /api/transaction-sync/review-queue
|
||||||
* @desc Get transactions needing manual review
|
* @desc Get transactions needing manual review
|
||||||
* @access Private (Managers only)
|
* @access Private (Managers only)
|
||||||
*/
|
*/
|
||||||
router.get('/review-queue', requireManager, transactionSyncController.getReviewQueue);
|
router.get('/review-queue', authenticateToken, requireManager, transactionSyncController.getReviewQueue);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @route POST /api/transaction-sync/approve
|
* @route POST /api/transaction-sync/approve
|
||||||
* @desc Approve a suggested payment match
|
* @desc Approve a suggested payment match
|
||||||
* @access Private (Managers only)
|
* @access Private (Managers only)
|
||||||
*/
|
*/
|
||||||
router.post('/approve', requireManager, transactionSyncController.approveSuggestedMatch);
|
router.post('/approve', authenticateToken, requireManager, transactionSyncController.approveSuggestedMatch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @route POST /api/transaction-sync/reject
|
* @route POST /api/transaction-sync/reject
|
||||||
* @desc Reject a suggested payment match
|
* @desc Reject a suggested payment match
|
||||||
* @access Private (Managers only)
|
* @access Private (Managers only)
|
||||||
*/
|
*/
|
||||||
router.post('/reject', requireManager, transactionSyncController.rejectSuggestedMatch);
|
router.post('/reject', authenticateToken, requireManager, transactionSyncController.rejectSuggestedMatch);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @route GET /api/transaction-sync/stats
|
* @route GET /api/transaction-sync/stats
|
||||||
* @desc Get sync statistics
|
* @desc Get sync statistics
|
||||||
* @access Private (Managers only)
|
* @access Private (Managers only)
|
||||||
*/
|
*/
|
||||||
router.get('/stats', requireManager, transactionSyncController.getSyncStats);
|
router.get('/stats', authenticateToken, requireManager, transactionSyncController.getSyncStats);
|
||||||
|
|
||||||
module.exports = router;
|
module.exports = router;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue