1d22adc42e
Backend (Express + MariaDB) y frontend (React + Vite, identidad Fluent/Windows) con el nucleo funcional: seguridad, organizacion, proyectos, actividades, subtareas, dependencias, dashboard, calendario, gantt, comentarios, adjuntos, notificaciones in-app y catalogos. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
15 lines
503 B
JavaScript
15 lines
503 B
JavaScript
import { Router } from 'express';
|
|
import { requireAuth } from '../../middleware/auth.js';
|
|
import { upload } from '../../middleware/upload.js';
|
|
import { getAttachments, postAttachment, downloadAttachment, deleteAttachment } from './controller.js';
|
|
|
|
const router = Router();
|
|
|
|
router.use(requireAuth);
|
|
router.get('/', getAttachments);
|
|
router.post('/', upload.single('file'), postAttachment);
|
|
router.get('/:id/download', downloadAttachment);
|
|
router.delete('/:id', deleteAttachment);
|
|
|
|
export default router;
|