From 69a1c137934cb2b472909ac7daba77390277abea Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Thu, 8 Oct 2020 12:28:59 +0100 Subject: [PATCH] Using array de-structuring as per review. --- packages/server/src/api/controllers/record.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/server/src/api/controllers/record.js b/packages/server/src/api/controllers/record.js index 56a272492e..e400d29ca9 100644 --- a/packages/server/src/api/controllers/record.js +++ b/packages/server/src/api/controllers/record.js @@ -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,