Skip to content

Improve authorization, error handling, and post data aggregation#21

Merged
hussein-m-kandil merged 7 commits intomainfrom
dev
Feb 28, 2026
Merged

Improve authorization, error handling, and post data aggregation#21
hussein-m-kandil merged 7 commits intomainfrom
dev

Conversation

@hussein-m-kandil
Copy link
Copy Markdown
Owner

Summary

This PR enhances API correctness, security, and data richness by improving authorization checks, standardizing error responses, and enriching post-related aggregation logic.


Key Improvements

Authorization & Error Handling

  • Return 403 for mutation attempts by non-owner or non-admin users.
  • Return 404 when requesting:
    • Profiles with invalid IDs.
    • Posts with invalid IDs.

Post & Interaction Enhancements

  • Add followed flag to post, comment, and vote authors.
  • Include upvotes/downvotes summary with post data.
  • Support fetching posts from profiles followed by the current user.
  • Aggregate full user/author data with post comments and votes.

@hussein-m-kandil hussein-m-kandil merged commit 6265fe4 into main Feb 28, 2026
1 check passed
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