From 5e2e2680b59f3ee7817fd1922d0019885934892b Mon Sep 17 00:00:00 2001 From: sbriat Date: Mon, 13 Mar 2023 16:54:28 +0100 Subject: [PATCH] add logging for deploy debugging --- .gitlab-ci.yml | 4 ++-- .../authorization/adapters/secondaries/opa.decision-maker.ts | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 406ae1f..ca5857f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,6 +41,6 @@ build: script: - docker build --pull -t "$CI_REGISTRY_IMAGE" . - docker push "$CI_REGISTRY_IMAGE" - only: - - main + # only: + # - main when: manual diff --git a/src/modules/authorization/adapters/secondaries/opa.decision-maker.ts b/src/modules/authorization/adapters/secondaries/opa.decision-maker.ts index 0e9d5e8..e328692 100644 --- a/src/modules/authorization/adapters/secondaries/opa.decision-maker.ts +++ b/src/modules/authorization/adapters/secondaries/opa.decision-maker.ts @@ -28,6 +28,7 @@ export class OpaDecisionMaker extends IMakeDecision { (obj, item) => Object.assign(obj, { [item.name]: item.value }), {}, ); + console.log(reducedContext); try { const { data } = await lastValueFrom( this._httpService.post( @@ -40,8 +41,10 @@ export class OpaDecisionMaker extends IMakeDecision { }, ), ); + console.log('data:', data); return new Authorization(data.result.allow); } catch (e) { + console.log('error', e); return new Authorization(false); } }