Skip to content

Testimonial PATCH accepts fractional ratings rejected by the database #472

@rissrice2105-agent

Description

@rissrice2105-agent

PATCH /api/testimonials/[id] validates that ratings are numbers between 1 and 5, but it does not require an integer. A rating such as 4.5 passes route validation and reaches the testimonials.rating INTEGER database column, causing a late database failure.

Expected: reject fractional ratings with a clear 400 validation response before any testimonial update query.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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