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

Ajout du modèle ChefDeFile #45

Merged
merged 5 commits into from
Nov 3, 2022
Merged

Ajout du modèle ChefDeFile #45

merged 5 commits into from
Nov 3, 2022

Conversation

tmerlier
Copy link
Contributor

@tmerlier tmerlier commented Oct 27, 2022

Contexte

Cette PR prépare la migration du fichier client.yml sur mongodb en ajoutant un modèle ChefDeFile qui sera lié au prochain modèle Client.

ChefDeFile

{
  _id: '7n51dae287088f21afd07c580',
  nom: 'Nom du chef de file',
  email: 'chefdefile@email.fr',
  perimetre: ['epci-246800726', 'departement-14', 'commune-27115'],
  signataireCharte: true,
  _createdAt: '1970-01-01',
  _updatedAt: '1970-01-01',
}

Routes

Toutes les routes nécéssitent une authentification administrateur

/chefs-de-file

  • Créer un chef de file : POST /chefs-de-file/
  • Récupérer un chef de file : GET /chefs-de-file/:chefDeFileId
  • Modifier un chef de file : PUT /chefs-de-file/:chefDeFileId

Cette PR est issue d'un découpage de #39 afin de faciliter la revue et l'intégration.

@tmerlier tmerlier self-assigned this Oct 27, 2022
@tmerlier tmerlier marked this pull request as ready for review October 27, 2022 10:07
Copy link
Contributor

@cedric-famibelle-pronzola cedric-famibelle-pronzola left a comment

Choose a reason for hiding this comment

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

Les erreurs de payload renvoient systématiquement le message Invalid payload
Il n'y a pas de message "personnalisé" en fonction de l'erreur.

@tmerlier tmerlier closed this Oct 27, 2022
@tmerlier tmerlier reopened this Oct 27, 2022
@tmerlier
Copy link
Contributor Author

oups

lib/util/cog.js Outdated Show resolved Hide resolved
lib/util/cog.js Outdated Show resolved Hide resolved
lib/chefs-de-file/routes.js Outdated Show resolved Hide resolved
@tmerlier tmerlier merged commit 15a4691 into master Nov 3, 2022
@tmerlier tmerlier deleted the tmerlier/chefs-de-file branch November 3, 2022 19:13
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.

None yet

3 participants