mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-24 01:16:15 -04:00
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:
parent
5192a0c498
commit
62345ac8f7
8 changed files with 379 additions and 570 deletions
|
@ -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");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue