feat: improve type definitions and refactor API responses for better type safety
Some checks failed
CI / lint (push) Failing after 7s
CI / test-backend (push) Has been skipped
CI / test-frontend (push) Has been skipped
CI / test-e2e (push) Has been skipped

This commit is contained in:
2026-03-18 19:37:23 +01:00
parent a07096d7c7
commit 3096a9b472
15 changed files with 528 additions and 161 deletions

View File

@@ -1,10 +1,11 @@
import { FastifyInstance } from 'fastify';
import { runner } from '../jobs/importRunner';
import { importDirectory } from '../services/importService';
import type { ImportScanBody } from '../types';
export default async function importRoutes(app: FastifyInstance) {
app.post('/import/scan', async (request, reply) => {
const body = request.body as any;
const body = request.body as ImportScanBody;
// Encolar el job en background
setImmediate(() => {