1
0
Fork 0
mirror of synced 2024-10-02 10:08:09 +13:00

Using array de-structuring as per review.

This commit is contained in:
mike12345567 2020-10-08 12:28:59 +01:00
parent 25cc60aa94
commit 69a1c13793

View file

@ -256,10 +256,8 @@ exports.fetchEnrichedRecord = async function(ctx) {
}
return
}
// // need model to work out where links go in record
const modelAndRecord = await Promise.all([db.get(modelId), db.get(recordId)])
const model = modelAndRecord[0]
const record = modelAndRecord[1]
// need model to work out where links go in record
const [model, record] = await Promise.all([db.get(modelId), db.get(recordId)])
// get the link docs
const linkVals = await linkRecords.getLinkDocuments({
instanceId,