From 44d05340682895ab7cf5ed6b659477f82c0caa12 Mon Sep 17 00:00:00 2001 From: munkhsaikhan Date: Wed, 11 Oct 2023 23:51:56 +0800 Subject: [PATCH] findBranch with fields --- packages/core/src/messageBroker.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/messageBroker.ts b/packages/core/src/messageBroker.ts index d63f345584..a825b06a43 100644 --- a/packages/core/src/messageBroker.ts +++ b/packages/core/src/messageBroker.ts @@ -457,11 +457,11 @@ export const initBroker = async options => { consumeRPCQueue('core:branches.find', async ({ subdomain, data }) => { const models = await generateModels(subdomain); - const { query } = data; + const { query, fields } = data; return { status: 'success', - data: await models.Branches.find(query).lean() + data: await models.Branches.find(query, fields).lean() }; });