Hammad887 / chat-app

0 stars 0 forks source link

Code Quality Improved for db and service layer #16

Closed Hammad887 closed 1 year ago

Hammad887 commented 1 year ago
  1. Made error messages more relevant and descriptive.
  2. Updated method comments to match their functionality.
  3. General formatting and consistency improvements.
  4. Separated functions which makes the code more readable, and each function does only one thing, following the Single Responsibility Principle.
  5. Made sure my code already parameterized the SQL queries, so it is safe from SQL injections.
  6. For consistent error messages, I have wrapped errors using the format: "action + subject + context".
  7. Organized/cleaned up the imports
  8. Using the provided context now in my database calls. This ensures that my SQL queries respect the timeouts and other settings of the passed-in context.
  9. Added Readme file.