Skip to content

Feat: Review read apis#582

Open
TropicalDog17 wants to merge 10 commits intoShonen-Labs:mainfrom
TropicalDog17:feat/review-read-apis
Open

Feat: Review read apis#582
TropicalDog17 wants to merge 10 commits intoShonen-Labs:mainfrom
TropicalDog17:feat/review-read-apis

Conversation

@TropicalDog17
Copy link

🚀 Pull Request Description

Description

Please include a summary of the change and which issue is fixed (if any). Please also include relevant motivation and context. List any dependencies that are required for this change.

🔗 Linked Issues

Fixes #559

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Chore (refactoring, dependency updates, etc.)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration.

  • Unit Tests
  • Integration Tests
  • End-to-End Tests (describe manual steps or automated test suite)
  • Tested locally with full stack setup

📸 Screenshots

[Include relevant screenshots or screen recordings demonstrating the changes]

✅ PR Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have tested these changes locally
  • Relevant documentation is updated
  • My code follows the repository's coding guidelines
  • I have added/updated tests that prove my fix/feature
  • No breaking changes introduced
  • Code is well-commented and readable

…ompanies/{slug}/posts

- Add GET /posts/{id} endpoint for fetching single review
- Add GET /companies/{slug}/posts endpoint for company-scoped feed
- Implement cursor pagination with limit, since, until, tag, status filters
- Add text sanitization for public responses
- Add proper error handling (410 Gone for soft-deleted, 404 for non-existent)
- Add DB composite indexes for performance
- Add tests for single fetch and company feed pagination
- Update route parameter syntax from :id to {id} for Axum v0.7 compatibility
- Fix SQL query in list_company_reviews to properly handle deleted reviews
- Update test assertions in reviews_test.rs:
  - Fix test_get_review_by_id to use correct ID
  - Fix test_text_sanitization to handle HTML content
  - Fix test_list_company_reviews to match actual behavior
@vercel
Copy link

vercel bot commented Aug 31, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
stark-finder-mq45 Ready Ready Preview Comment Sep 15, 2025 6:56pm

@PoulavBhowmick03
Copy link
Contributor

@TropicalDog17 the Anon CICD is failing, please check

@PoulavBhowmick03
Copy link
Contributor

@TropicalDog17 updates?

@TropicalDog17
Copy link
Author

Can you help me with the issue, no idea why ci fail here, local work fine for me

Copy link
Contributor

@PoulavBhowmick03 PoulavBhowmick03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you also update the API docs in swagger, apart from lint and build passing

…d company-specific review listing

- Add /posts/:id endpoint to get reviews by ID with 410 for deleted reviews
- Add /companies/:slug/posts endpoint to list company reviews with filtering
- Implement text sanitization for review content
- Update tests with proper BigDecimal parsing and fix race conditions
- Regenerate SQLx query cache for new review endpoints
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.

(feat: anon/backend) : Review Read APIs : Get by ID + Company-scoped feed

2 participants