Merge pull request #28845 from overleaf/td-async-await-doc-updater-client

Convert DocUpdateClient in document-updater acceptance tests to async/await

GitOrigin-RevId: 8f2352119f8f1175c2703ed90dbbc483ed039e86
This commit is contained in:
Tim Down
2025-10-08 08:05:26 +00:00
committed by Copybot
parent 07234fd7d2
commit c104aa454e
21 changed files with 1359 additions and 3425 deletions
@@ -226,7 +226,11 @@ async function setDoc(req, res) {
)
timer.done()
logger.debug({ projectId, docId }, 'set doc via http')
res.json(result)
// If the document is unchanged and hasn't been updated, `result` will be
// undefined, which leads to an invalid JSON response, so we send an empty
// object instead.
res.json(result || {})
}
async function appendToDoc(req, res) {