Skip to content

DTOs for safer and cleaner data handling(enhancement) #24

@Celenkosini

Description

@Celenkosini

Thank you for great work on this project, I've been exploring the codebase and noticed that in several places, entities are being used directly in controller methods.

While this works, it can lead to couple of potential issues:

  1. Security risks: Exposing entire entities may unintentionally reveal sensitive fields (e.g passwords)
  2. Validation complexity: It's harder to control and input when directly binding to entities
  3. Tight coupling: Changes in the entity could unintentionally break API contracts or client integrations.

Suggestion:
It might be beneficial to introduce DTO classes for request and response models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions