fix 0.46 regression to set up sync from client, fixes #1742

This commit is contained in:
zadam 2021-03-13 22:54:00 +01:00
parent 88d04772c4
commit 6c8d20288d

View file

@ -84,7 +84,15 @@ function exec(opts) {
}); });
}); });
request.end(opts.body); let payload;
if (opts.body) {
payload = typeof opts.body === 'object'
? JSON.stringify(opts.body)
: opts.body;
}
request.end(payload);
} }
catch (e) { catch (e) {
reject(generateError(opts, e.message)); reject(generateError(opts, e.message));