summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eug-vs@keemail.me>2021-05-10 23:11:38 +0300
committereug-vs <eug-vs@keemail.me>2021-05-10 23:11:38 +0300
commit3c4ef9463599537c44a9e1a7f38470fee7368f5a (patch)
tree8aa2ff9ae3cabeec47b3452fb3175d359926d7ee
parent6a07f0493ab570736b244f931a440307b0bf92ec (diff)
downloadcommercel-api-master.tar.gz
fix: use correct find syntaxHEADmaster
-rw-r--r--src/services/uploads.service.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/services/uploads.service.ts b/src/services/uploads.service.ts
index 9a61a50..cb9ebc6 100644
--- a/src/services/uploads.service.ts
+++ b/src/services/uploads.service.ts
@@ -34,7 +34,7 @@ const parseAccountId = (rows: any[], context: HookContext) => {
return context.app
.service('accounts')
- .find({ code })
+ .find({ query: { code } })
.then((results: any[]) => {
if (results.length) return results[0];
return context.app
@@ -85,7 +85,7 @@ const parseTransfersBill = async (context: HookContext): Promise<HookContext> =>
const contractorId = await context.app
.service('contractors')
- .find({ vatId })
+ .find({ query: { vatId } })
.then((results: any[]) => {
if (results.length) return results[0];
return context.app