Skip to content

fix(review): ensure moderation_status and is_approved default values on create in reviewRepository - #1709

Open
Pratyush-Panda-2006 wants to merge 1 commit into
AnthropicBots:mainfrom
Pratyush-Panda-2006:fix/review-repo-moderation-defaults
Open

fix(review): ensure moderation_status and is_approved default values on create in reviewRepository#1709
Pratyush-Panda-2006 wants to merge 1 commit into
AnthropicBots:mainfrom
Pratyush-Panda-2006:fix/review-repo-moderation-defaults

Conversation

@Pratyush-Panda-2006

Copy link
Copy Markdown
Contributor

Description

Fixes missing review moderation defaults in \�ackend/repositories/reviewRepository.js. Previously, \ReviewRepository.create()\ omitted \moderation_status\ and \is_approved\ during database insertion, causing reviews created through the repository layer to be excluded by \ indByProduct()\ queries that filter on \moderation_status = 'approved'.

Related Issue

Closes #1694

Clean Architecture & Changes

  • Explicitly specified default \moderation_status = 'approved'\ and \is_approved = 1\ in \ReviewRepository.create().
  • Added unit tests in \�ackend/tests/reviewRepoModeration.test.js\ validating SQL statement construction and parameter binding.

Verification

  • Run
    px jest tests/reviewRepoModeration.test.js\ (All unit tests passing cleanly).

@hydra-maintainer

Copy link
Copy Markdown

🔍 Quality Gate Report

✅ All quality gates passed!

Status Check Details
Linked Issue PR description references a closing issue ✅

@vercel

vercel Bot commented Aug 27, 2026

Copy link
Copy Markdown

@Pratyush-Panda-2006 is attempting to deploy a commit to the Bhuvansh's projects Team on Vercel.

A member of the Team first needs to authorize it.

@hydra-maintainer

Copy link
Copy Markdown

🤖 AI Code Review

🔴 Score: 50/100 | comment

AI review unavailable at this time.


Automated AI review — a human maintainer will also review.

@hydra-maintainer

Copy link
Copy Markdown

💡 Suggested reviewers based on relevant file history: @Aditya8369, @MOHITKOURAV01

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Missing moderation_status and is_approved Defaults on Repository Review Creation

1 participant