import express from 'express';
import {
  getMapData,
  getDashboardStats,
  getChartData
} from '../controllers/mapController.js';
import { requireAuth } from '../middleware/auth.js';

const router = express.Router();

// All routes require authentication
router.get('/project/:treelogy_id/data', requireAuth, getMapData);
router.get('/project/:treelogy_id/stats', requireAuth, getDashboardStats);
router.get('/project/:treelogy_id/charts', requireAuth, getChartData);

export default router;
