// salaryRoutes.js
import express from 'express';

import { authenticateAdmin } from '../middleware/auth.js';
import { getSalaryHistory, getSalaryPreview, processSalaryPayout } from '../controllers/Salarycontroller.js';

const router = express.Router();

router.get( '/member/preview', authenticateAdmin, getSalaryPreview);
router.post('/member/pay',     authenticateAdmin, processSalaryPayout);
router.get( '/member/history', authenticateAdmin, getSalaryHistory);




export default router;

// ── app.js mein add karo: ──
// import salaryRoutes from './routes/salaryRoutes.js';
// app.use('/api/admin/salary', salaryRoutes);