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

1762: Add agency information to region #1902

Merged
merged 8 commits into from
Feb 28, 2025
Merged

Conversation

f1sh1918
Copy link
Contributor

@f1sh1918 f1sh1918 commented Feb 13, 2025

Short description

Here we add required agency information from freinet to our regions. We need the agencyId and accessKey to push applicant and card data to freinet in a separate issue

Proposed changes

  • add new database table with freinet agency information
  • add FreinetAgencyLoader that fetches agency information on backend startup
  • store the agency information in the database and map it to a region
  • add a query to get agency information by regionId
  • add api tests

Note

Here is a separate pr to provide backend config and the freinet api access key on the server
https://git.tuerantuer.org/DF/salt/pulls/309/files
Frontend implementation will be done in #1899

Side effects

  • none

Testing

  1. First you have to add the freinet information & api access key to your config.local.yml
    You can find the accessKey here: https://passbolt.tuerantuer.org/app/passwords/view/0b693665-7176-4524-a6dd-206fad7c4d8d
  2. Run migration
  3. Run backend start
  4. Agency data should be stored in the database

Resolved issues

Fixes: #1762

…eate a separate table for these information, add a relation between those tables
@f1sh1918 f1sh1918 force-pushed the 1762-add-agency-id-to-region branch from 89f3c49 to 1add00b Compare February 13, 2025 09:38
@f1sh1918 f1sh1918 marked this pull request as draft February 16, 2025 21:04
@f1sh1918 f1sh1918 force-pushed the 1762-add-agency-id-to-region branch from 1add00b to a24d89f Compare February 17, 2025 09:41
@f1sh1918 f1sh1918 marked this pull request as ready for review February 17, 2025 09:47
Copy link
Member

@steffenkleinle steffenkleinle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, works as expected. Nice work! The api key is quite short.... 🤔

@f1sh1918
Copy link
Contributor Author

Tested, works as expected. Nice work! The api key is quite short.... 🤔

I know. but thats what we got from freinet. You can tell them your concern about security issues

Copy link
Contributor

@andrew8er andrew8er left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some stylistic suggestions.

@f1sh1918
Copy link
Contributor Author

f1sh1918 commented Feb 27, 2025

Some stylistic suggestions.

Thanks for the great review. I think i addressed all comments.
On one or two i was a bit unsure if solved it correctly.
So it would be good to check my last commit

@f1sh1918 f1sh1918 force-pushed the 1762-add-agency-id-to-region branch from 16c6560 to 9cb5b39 Compare February 28, 2025 09:19
@f1sh1918 f1sh1918 enabled auto-merge February 28, 2025 09:19
@f1sh1918 f1sh1918 merged commit c2e4cff into main Feb 28, 2025
1 of 2 checks passed
@f1sh1918 f1sh1918 deleted the 1762-add-agency-id-to-region branch February 28, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add freinet agency information
3 participants