const express = require('express');
const { getBhajans, createBhajan, deleteBhajan, uploadAudio } = require('../controllers/bhajanController.js');
const authMiddleware = require('../middleware/authMiddleware.js');
const upload = require('../middleware/uploadMiddleware.js');

const router = express.Router();

router.get('/', getBhajans);
router.post('/upload', authMiddleware, upload.single('audio'), uploadAudio);
router.post('/add', authMiddleware, createBhajan);
router.delete('/:id', authMiddleware, deleteBhajan);

module.exports = router;
