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

🌡️ fix: Delete Endpoint Validation, List Index Errors, use PyJWT #42

Merged
merged 9 commits into from
May 22, 2024

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented May 22, 2024

Summary

I implemented improvements to the delete_documents endpoint and added a MongoDB health check to ensure better validation and connectivity.

  • Changed the delete_documents endpoint to use a Pydantic model for better request body validation.
  • Fixed the issue where the delete_documents endpoint was incorrectly using query parameters.
  • Added a MongoDB health check to ensure database connectivity.
  • Refactored the code to use enums for constants, improving readability and maintainability.
  • swap python-jose for PyJWT due to security advisories
  • add warning that MongoDB Atlas is not querying correctly

Testing

I tested the changes locally by making DELETE requests to the delete_documents endpoint with valid and invalid request bodies to verify the Pydantic model validation. I also monitored the MongoDB health check functionality to ensure it accurately reflects the database status.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

@danny-avila danny-avila changed the title 🌡️ fix: Delete Endpoint Validation and Add MongoDB Health Check 🌡️ fix: Delete Endpoint Validation, List Index Errors, use PyJWT May 22, 2024
@danny-avila danny-avila linked an issue May 22, 2024 that may be closed by this pull request
@danny-avila danny-avila merged commit a3bee40 into main May 22, 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.

PDF failed to process
1 participant