// backend/routes/fileRoutes.js
import express from 'express';
import { uploadFiles, deleteFile, getUserFiles, previewFile } from '../controllers/fileController.js';
import authMiddleware from '../middlewares/authMiddleware.js';

const router = express.Router();

router.post('/upload', authMiddleware, uploadFiles);
router.delete('/:id', authMiddleware, deleteFile);
router.get('/', authMiddleware, getUserFiles);
router.get('/preview/:filename', authMiddleware, previewFile);

export default router;

