import express from 'express';
import { createForm, getFormById, updateForm, getFormsByClient, deleteForm } from '../controllers/formController.js';
import { requireAuth } from '../middleware/auth.js';

const router = express.Router();

// Authenticated routes
router.post('/forms', requireAuth, createForm);
router.get('/forms/client/:client_id', requireAuth, getFormsByClient);
router.get('/forms/:id', requireAuth, getFormById);
router.put('/forms/:id', requireAuth, updateForm);
router.delete('/forms/:id', requireAuth, deleteForm);

export default router;


