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

Dev #2

Merged
merged 6 commits into from
Oct 14, 2024
Merged

Dev #2

merged 6 commits into from
Oct 14, 2024

Conversation

kstafa
Copy link
Owner

@kstafa kstafa commented Oct 14, 2024

Tâches pour l'implémentation de la fonctionnalité de suppression d'atelier

  1. Ajouter un bouton "Supprimer" à côté de chaque atelier dans index.ejs
  2. Implémenter la route POST /remove-workshop dans index.js
  3. Mettre à jour la fonction removeWorkshopByName dans inMemoryWorkshop.js
  4. Mettre à jour la fonction removeWorkshopByName dans mongoWorkshop.js
  5. Ajouter la gestion des erreurs et la validation
  6. Mettre à jour le fichier README.md avec la description de la nouvelle fonctionnalité

Veuillez examiner les modifications et fournir des commentaires si nécessaire.

@kstafa
Copy link
Owner Author

kstafa commented Oct 14, 2024

This pull request introduces several new features and improvements to the workshop management system, including updates to the user interface, backend functionality, and documentation. The most important changes are detailed below.

New Features and Enhancements:

  • README.md: Added a new "Features" section to list the capabilities of the application, such as creating, viewing, editing, and deleting workshops. (README.md)

User Interface Updates:

  • ejs/index.ejs: Updated the workshop list to include a "Supprimer" button for deleting workshops, with a confirmation prompt in French. The "Edit" button text was also changed to "Modifier". (ejs/index.ejs)

Backend Functionality:

  • js/inMemoryWorkshop.js: Implemented the removeWorkshopByName function to delete a workshop from the in-memory list and handle errors if the workshop is not found. (js/inMemoryWorkshop.js)
  • js/index.js: Added a new endpoint /remove-workshop to handle the deletion of workshops via a POST request. This endpoint interacts with the repository to remove the specified workshop and handles errors appropriately. (js/index.js)
  • js/mongoWorkshop.js: Updated the removeWorkshopByName function to use deleteOne instead of deleteMany for more precise deletion and added error handling for cases where the workshop is not found in the MongoDB collection. (js/mongoWorkshop.js)

@kstafa
Copy link
Owner Author

kstafa commented Oct 14, 2024

Validée ✅

@kstafa kstafa merged commit be69694 into master Oct 14, 2024
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.

1 participant