feat(documents): папки шаблонов, маппинги и поле document_template; fix(batch): атомарное создание задач, idempotency и массовое удаление в реестре
This commit is contained in:
@@ -18,7 +18,11 @@ export class DOCXConverterService {
|
||||
lang: options.lang || 'ru-RU',
|
||||
};
|
||||
|
||||
const result = await HTMLtoDOCX(html, null, opts);
|
||||
const convertFn = typeof HTMLtoDOCX === 'function' ? HTMLtoDOCX : (HTMLtoDOCX as any).default;
|
||||
if (typeof convertFn !== 'function') {
|
||||
throw new Error('HTMLtoDOCX converter is not available');
|
||||
}
|
||||
const result = await convertFn(html, null, opts);
|
||||
if (result instanceof ArrayBuffer) {
|
||||
return Buffer.from(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user