-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Events v2: notify country config of new actions performed on events #8322
Conversation
Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:
|
await fetch( | ||
new URL( | ||
`/events/${event.type}/actions/${action.type}`, | ||
env.COUNTRY_CONFIG_URL | ||
), | ||
{ | ||
method: 'POST', | ||
body: JSON.stringify(event), | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${token}` | ||
} | ||
} | ||
) |
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.
non-200 would not throw, is that okay? consider adding if(!response.ok) ...
PR LGTM after this
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.
Yea, that's intentional for now 👍
…re into events-v2-notify-cc
All actions now trigger a
POST /events/{eventType}/actions/{actionId}
request to country config with aEventDocument
payload. No response is expected from CC. Next step is to expose TRPC commands to country config through which it can confirm the registrationCC: opencrvs/opencrvs-countryconfig#361