From e91668e664fca7d9826fd45e179cafe1b3cbe975 Mon Sep 17 00:00:00 2001 From: Simonas Karuzas Date: Thu, 19 Mar 2020 13:19:04 +0200 Subject: [PATCH] fix: Fetching credentials for SDR --- packages/daf-cli/src/setup.ts | 2 +- packages/daf-data-store/src/data-store.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/daf-cli/src/setup.ts b/packages/daf-cli/src/setup.ts index 2c9610936..f15ca9b21 100644 --- a/packages/daf-cli/src/setup.ts +++ b/packages/daf-cli/src/setup.ts @@ -85,7 +85,7 @@ export const initializeDb = async () => { type: 'sqlite', database: defaultPath + 'database-v2.sqlite', synchronize: true, - logging: false, + logging: process.env.DEBUG_DAF_DB ? true : false, entities: [...Daf.Entities], }) } diff --git a/packages/daf-data-store/src/data-store.ts b/packages/daf-data-store/src/data-store.ts index d380b5f60..5078c3569 100644 --- a/packages/daf-data-store/src/data-store.ts +++ b/packages/daf-data-store/src/data-store.ts @@ -67,11 +67,11 @@ export class DataStore { claim_type: string }) { let where = {} - - if (iss) { + + if (iss && iss.length > 0) { where['issuer'] = In(iss) } - if (sub) { + if (sub && iss.length > 0) { where['subject'] = In(sub) }