feat: add admin report fetch api

This commit is contained in:
2025-12-04 15:15:22 +05:30
parent c481e4f139
commit 61b85abdd1
2 changed files with 9 additions and 7 deletions

View File

@@ -7,6 +7,8 @@ const router = express.Router();
router.post('/login', adminAuthController.login); router.post('/login', adminAuthController.login);
router.get('/admin_details', adminAuthenticate, adminAuthController.fetchAdminDetails); router.get('/admin_details', adminAuthenticate, adminAuthController.fetchAdminDetails);
router.get('/fetch/customer_details',adminAuthenticate,adminAuthController.getUserDetails); router.get('/fetch/customer_details',adminAuthenticate,adminAuthController.getUserDetails);
// User configuration
router.post('/user/rights',adminAuthenticate,adminAuthController.UserRights); router.post('/user/rights',adminAuthenticate,adminAuthController.UserRights);
router.get('/user/rights',adminAuthenticate,adminAuthController.getUserRights); router.get('/user/rights',adminAuthenticate,adminAuthController.getUserRights);
router.post('/user/unlock',adminAuthenticate,adminAuthController.handleUnlockUser); router.post('/user/unlock',adminAuthenticate,adminAuthController.handleUnlockUser);

View File

@@ -14,16 +14,11 @@ const branchRoute = require('./branch.route');
const atmRoute = require('./atm.route'); const atmRoute = require('./atm.route');
const { npciResponse } = require('../controllers/npci.controller'); const { npciResponse } = require('../controllers/npci.controller');
const otp = require('./otp.route'); const otp = require('./otp.route');
<<<<<<< HEAD
const reports =require('./report.route'); const reports =require('./report.route');
=======
const eMandate = require('./emandate.route'); const eMandate = require('./emandate.route');
>>>>>>> 7e162e741d4d126fd029b1875bd5e4e0d3c460cf
const router = express.Router(); const router = express.Router();
router.use('/auth', authRoute); router.use('/auth', authRoute);
router.use('/auth/admin', adminAuthRoute);
router.use('/customer', authenticate, detailsRoute); router.use('/customer', authenticate, detailsRoute);
router.use('/transactions/account/:accountNo', authenticate, transactionRoute); router.use('/transactions/account/:accountNo', authenticate, transactionRoute);
router.use('/payment/transfer', authenticate, transferRoute); router.use('/payment/transfer', authenticate, transferRoute);
@@ -32,10 +27,15 @@ router.use('/payment/rtgs', authenticate, rtgsRoute);
router.use('/payment/imps', authenticate, impsRoute); router.use('/payment/imps', authenticate, impsRoute);
router.use('/beneficiary', authenticate, beneficiaryRoute); router.use('/beneficiary', authenticate, beneficiaryRoute);
router.use('/npci/beneficiary-response', npciResponse); router.use('/npci/beneficiary-response', npciResponse);
router.use('/report',adminAuthenticate,reports);
router.use('/otp', otp);
router.use('/e-mandate', authenticate, eMandate); router.use('/e-mandate', authenticate, eMandate);
router.use('/branch', authenticate, branchRoute); router.use('/branch', authenticate, branchRoute);
router.use('/atm', authenticate, atmRoute); router.use('/atm', authenticate, atmRoute);
// OTP
router.use('/otp', otp);
// Admin APIs
router.use('/auth/admin', adminAuthRoute);
router.use('/report',adminAuthenticate,reports);
module.exports = router; module.exports = router;