feat: improve type definitions and refactor API responses for better type safety
This commit is contained in:
@@ -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(() => {
|
||||
|
||||
Reference in New Issue
Block a user