const express = require('express');
const { upload } = require('../middleware/upload');
const { uploadImage } = require('../controllers/uploadController');
const { authenticateAdmin } = require('../middleware/auth');

const router = express.Router();

/**
 * @route   POST /api/v1/admin/upload/image
 * @desc    Upload and process an image (Admin)
 * @access  Private (requires admin authentication)
 */
router.post(
  '/image',
  authenticateAdmin,
  upload.single('file'),
  uploadImage
);

module.exports = router;
