const express = require('express'); const router = express.Router(); const { authenticateApiToken } = require('../middleware/auth'); const batchController = require('../controllers/batch-controller'); /** * POST /api/batch/build * Bündelt offene batch_submissions (xlsx + Sammel-Druck-PDF) und lädt sie per FTP * hoch. Body: { client_id?, label?, time_suffix? }. Ohne client_id → alle Zugänge. * Wird vom Directus-Knopf (ein Zugang, sofort) und intern vom Cron genutzt. */ router.post('/build', authenticateApiToken, batchController.buildBundles); module.exports = router;