import { Router } from 'express';
import { catalog, createCustom, customIndex, destroyCustom, updateCustom } from '../controllers/variableController.js';
import { requireAuth } from '../middleware/auth.js';

export const variableRoutes = Router();

// Variables expose the PSADT/POSHManager catalog plus user-managed runtime values for scripts.
variableRoutes.get('/catalog', requireAuth, catalog);
variableRoutes.get('/custom', requireAuth, customIndex);
variableRoutes.post('/custom', requireAuth, createCustom);
variableRoutes.put('/custom/:id', requireAuth, updateCustom);
variableRoutes.delete('/custom/:id', requireAuth, destroyCustom);
