-
Notifications
You must be signed in to change notification settings - Fork 7
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
Create api route to update district postal code with datanova #388
Create api route to update district postal code with datanova #388
Conversation
225cece
to
b26b211
Compare
Comme vu ensemble, faire deux routes "PUT" :
|
b26b211
to
8d3c42c
Compare
8d3c42c
to
2cfb46e
Compare
return bddDistrictMock | ||
.map(district => [district.meta.insee.cog, district]) | ||
.filter(([cog]) => districtCOGs.includes(cog)) | ||
.map(([, district]) => district) |
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.
Ici, pourquoi ne pas faire un simple filter : bddDistrictMock.filter(district => districtCOGs.includes(district.meta?.insee?.cog))
Il manque la partie sur le déclenchement de l'export vers mongo. Qu'est ce qui est prévu pour ce cas-là ? Est-ce que l'on veut exporter tous les districts qui ont changés ou bien tous les districts de France? |
New PR on this topic : #444 |
#363
Cette PR ajoute une route d'API pour mettre à jour les codes postaux des districts de la base postgres à l'aide de la base officielle des codes postaux.