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/post #20

Merged
merged 4 commits into from
Aug 26, 2024
Merged

Fix/post #20

merged 4 commits into from
Aug 26, 2024

Commits on Aug 25, 2024

  1. Update Post.java

    The code runs great and didn't needed lot of changes. Therefore i have tried my best to improve the performance and error handling of the code.
    
    - Removed "comments" field as not needed anymore
    - Added @notblank and @NotNull annotations to ensure that title, content, and user are always provided.
    - Added fetch = FetchType.LAZY to the User relationship to improve performance by loading user data only when needed.
    NishthaLath authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    8f29954 View commit details
    Browse the repository at this point in the history
  2. Update PostRepository.java

    - Added a method findByTag to retrieve posts by tag directly from the database (Improve Memory efficiency)
    The method helps further in PostService.java code.
    NishthaLath authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    e9530da View commit details
    Browse the repository at this point in the history
  3. Update PostService.java

    - Using findByTag method directly in getPostsByTag to improve efficiency.
    - Added a custom exception (RuntimeException) to handle cases where a post is not found.
    - Added @transactional annotation to updatePost and deletePost methods to ensure proper data management.
    NishthaLath authored Aug 25, 2024
    Configuration menu
    Copy the full SHA
    85447dc View commit details
    Browse the repository at this point in the history

Commits on Aug 26, 2024

  1. Configuration menu
    Copy the full SHA
    17cafdb View commit details
    Browse the repository at this point in the history