Merge pull request #12586 from Budibase/optimise-writethrough-put
Optimise the performance of Writethrough.put.
This commit is contained in:
commit
9f697719cc
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue