const express = require('express');
const router = express.Router();
const gpsController = require('../controllers/gpsController');

// ✅ Routes
router.post('/location', gpsController.storeLocation);
router.post('/location/start', gpsController.startTrackingSession);
//router.get('/location/history/:userId', gpsController.getTrackingHistory);
// ✅ Route to Get Tracking Sessions with Usernames
router.get('/ss', gpsController.getTrackingSessions);
// ✅ Route to Get Tracking Data for a Specific Session
router.get('/location/history/:userId/:trackingSessionId', gpsController.getTrackingHistory);
router.delete('/delete/:trackingSessionId', gpsController.deleteTrackingSession);
module.exports = router;
