import type { Request, Response } from "express";

export type ValidateFilesResult = {
    files: Express.Multer.File[];
};

export const validateFiles = async (req: Request, res: Response): Promise<ValidateFilesResult> => {
    const files = req.files as Express.Multer.File[] | undefined;
    if (!files || files.length === 0) throw new Error("No se encontraron archivos");

    return {
        files,
    };
};
