1
0
Fork 0
mirror of synced 2024-10-03 02:27:06 +13:00

Merge pull request #12586 from Budibase/optimise-writethrough-put

Optimise the performance of Writethrough.put.
This commit is contained in:
Sam Rose 2023-12-14 16:28:57 +00:00 committed by GitHub
commit 9f697719cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,11 +56,8 @@ async function put(
const writeDb = async (toWrite: any) => {
// doc should contain the _id and _rev
const response = await db.put(toWrite, { force: true })
output = {
...doc,
_id: response.id,
_rev: response.rev,
}
output._id = response.id
output._rev = response.rev
}
try {
await writeDb(doc)