Skip to content
This repository was archived by the owner on Feb 22, 2026. It is now read-only.
This repository was archived by the owner on Feb 22, 2026. It is now read-only.

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

@polopulao

Description

@polopulao

For any queries, or anything, join out [Telegram Group](https://t.me/shogenlabs) or contact [Poulav](https://t.me/impoulav), [Soham](https://t.me/tosoham) or [Rahul](https://t.me/darkdanate)

Title

Review Read APIs: Get by ID + Company-scoped Feed

Description

  • Type of Issue: Feature / Backend / API

  • Directory: anon/backend

  • Task :

    • Add endpoints:

      • GET /posts/{id} → fetch a single review by id
      • GET /companies/{slug}/posts → list reviews for a company (cursor pagination)
    • Query params for company feed: limit (≤50), cursor, since, until, tag?, status?=published

    • Response shape: { items: [...], next_cursor } with stable ordering by created_at DESC, id DESC

    • Redact any stored raw text (Mongo) in public responses; serve only sanitized/canonical text

    • Return 410 Gone if review is soft-deleted; 404 if never existed

    • Add DB composite indexes to support ordering and filters ((company_id, created_at DESC, id DESC))

    • Tests: single fetch (200/404/410), company feed pagination edges, filter combinations

  • Current:

    • GET /posts exists; no single-item GET or company-scoped alias
  • Expected:

    • GET /posts/{id} returns 200 {id, company_slug, text, tags, created_at, status} (sanitized text)
    • Company feed returns deterministic pages with next_cursor when more data available
    • Performance: P95 query < 50ms on seeded dataset (document in test output)

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions