import { Router } from 'express';
import { create, destroy, index, mobileApps, test, update } from '../controllers/graphController.js';
import { requireAuth } from '../middleware/auth.js';

export const graphRoutes = Router();

// Microsoft Graph environments for Intune app publishing/status tracking.
graphRoutes.get('/connections', requireAuth, index);
graphRoutes.post('/connections', requireAuth, create);
graphRoutes.put('/connections/:id', requireAuth, update);
graphRoutes.delete('/connections/:id', requireAuth, destroy);
graphRoutes.post('/connections/:id/test', requireAuth, test);
graphRoutes.get('/connections/:id/mobile-apps', requireAuth, mobileApps);
