const express = require('express');
const router = express.Router();
const hourlyDataController = require('../controllers/hourlyDataController.js');
const dailyDataController = require('../controllers/dailyDataController.js');

let testData = true;



if (testData) {
  router.get('/year/:year/month/:month/day/:day/location/:location', hourlyDataController.showLocationTest);
  router.get('/year/:year/month/:month/day/:day/hour/:hour', hourlyDataController.showHourTest);
  router.get('/year/:year/month/:month/day/:day/hour/:hour/csv', hourlyDataController.showHourCsvTest);
  router.get('/year/:year/month/:month/location/:location', dailyDataController.showLocationTest);
} else {
  router.get('/year/:year/month/:month/day/:day/location/:location', hourlyDataController.showLocation);
  router.get('/year/:year/month/:month/day/:day/hour/:hour', hourlyDataController.showHour);
  router.get('/year/:year/month/:month/day/:day/hour/:hour/csv', hourlyDataController.showHourCsv);
  router.get('/year/:year/month/:month/location/:location', dailyDataController.showLocation);
}

// router.get('/year/:year/month/:month/day/:day', dailyDataController.showDay);

module.exports = router;