-
Notifications
You must be signed in to change notification settings - Fork 2
[#176924316] Add Start EYCA activation api #20
Conversation
Affected stories
|
Codecov Report
@@ Coverage Diff @@
## master #20 +/- ##
==========================================
+ Coverage 81.01% 81.76% +0.74%
==========================================
Files 32 35 +3
Lines 864 1020 +156
Branches 99 122 +23
==========================================
+ Hits 700 834 +134
- Misses 159 179 +20
- Partials 5 7 +2
Continue to review full report at Codecov.
|
…_start_eyca_activation_api
…_start_eyca_activation_api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The review is ongoing. Part 1
StartEycaActivation/handler.ts
Outdated
// if orchestrator is running we return an Accepted Response | ||
// otherwise we assume the orchestrator is in error or | ||
// it has been canceled so we can try to start a new activation process | ||
mapOrchestratorStatus(_).map(() => fiscalCode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are ignoring here the right value of the chain (always fiscalcode
), can we pass void 0
instead to avoid confusion?
return taskEither.of( | ||
ResponseErrorInternal("Cannot recognize the orchestrator status") | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the purpose of this return.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the activation orchestrator will run until a final status is reached, if its status is not running or pending the card has been already updated (and we check card status at the top of the chain), so other statuses makes no sense and we will return an Internal Error (it should never happens). Let's keep in mind that another PR will add a specific mapping for error status that now seems to miss :)
Co-authored-by: Daniele Manni <[email protected]>
Co-authored-by: Daniele Manni <[email protected]>
StartEycaActivation/handler.ts
Outdated
maybeUserEycaCard.foldL( | ||
() => taskEither.of(void 0), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybeUserEycaCard.foldL( | |
() => taskEither.of(void 0), | |
maybeUserEycaCard.fold( | |
taskEither.of(void 0), |
Can we merge @balanza @BurnedMarshal ? |
* [#176924349] Add get EYCA Activation API
List of Changes
startEycaActivation
APIMotivation and Context
While a citizen requests for a CGN and he's between 18 up to 30 years old, he wants also activate an EYCA card ( CGN and EYCA are co-badged ), but in case of something goes wrong in EYCA activation, it must be possible to call directly EYCA activation from APP ( user retries ). Please Note that an EYCA activation process could not start if the user does not have already an
ACTIVATED
CGN.How Has This Been Tested?
It has been tested by performing unit tests and integration test.
Types of changes
Checklist: