import/export: conversion to Promises/async

NB1: needs additional review and testing - no abiword available on my test bed
NB2: in ImportHandler.js, directly delete the file, and handle the eventual
     error later: checking before for existence is prone to race conditions,
     and does not handle any errors anyway.
This commit is contained in:
Ray Bellis 2019-01-31 08:55:36 +00:00
parent 5192a0c498
commit 62345ac8f7
8 changed files with 379 additions and 570 deletions

View file

@ -287,7 +287,7 @@ exports.setHTML = async function(padID, html)
// add a new changeset with the new html to the pad
try {
await importHtml.setPadHTML(pad, cleanText(html));
importHtml.setPadHTML(pad, cleanText(html));
} catch (e) {
throw new customError("HTML is malformed", "apierror");
}