Skip to content
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

Merged
merged 8 commits into from
Jan 23, 2025

Conversation

rikukissa
Copy link
Member

@rikukissa rikukissa commented Jan 13, 2025

All actions now trigger a POST /events/{eventType}/actions/{actionId} request to country config with a EventDocument payload. No response is expected from CC. Next step is to expose TRPC commands to country config through which it can confirm the registration

CC: opencrvs/opencrvs-countryconfig#361

Copy link

Oops! Looks like you forgot to update the changelog. When updating CHANGELOG.md, please consider the following:

  • Changelog is read by country implementors who might not always be familiar with all technical details of OpenCRVS. Keep language high-level, user friendly and avoid technical references to internals.
  • Answer "What's new?", "Why was the change made?" and "Why should I care?" for each change.
  • If it's a breaking change, include a migration guide answering "What do I need to do to upgrade?".

Comment on lines +43 to +56
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}`
}
}
)
Copy link
Collaborator

@naftis naftis Jan 22, 2025

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

Copy link
Member Author

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 👍

@rikukissa rikukissa merged commit 96f6a2d into develop Jan 23, 2025
39 of 40 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants