Skip to content

feat: implement has_user_reviewed field for articles and reviews (Iss…#122

Open
Kaustubh1204 wants to merge 1 commit intom2b3:mainfrom
Kaustubh1204:main
Open

feat: implement has_user_reviewed field for articles and reviews (Iss…#122
Kaustubh1204 wants to merge 1 commit intom2b3:mainfrom
Kaustubh1204:main

Conversation

@Kaustubh1204
Copy link

Added has_user_reviewed boolean to article and review API responses.
Updated schemas: ArticleOut, ArticlesListOut, ArticleBasicOut, PaginatedReviewSchema.
Updated endpoints: articles/api.py, articles/review_api.py, users/api.py, communities/articles_api.py.
Computes review status based on the authenticated user’s review history.
Optimized list endpoints (/api/articles/, /api/communities/{slug}/articles/) with bulk pre-fetching to prevent N+1 query issues.
Enables frontend improvements, e.g., disabling the “Review” button when the user has already reviewed an article.

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