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

const router = express.Router();

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

module.exports = router;
