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.
PATCH /api/testimonials/[id]validates that ratings are numbers between 1 and 5, but it does not require an integer. A rating such as4.5passes route validation and reaches thetestimonials.rating INTEGERdatabase column, causing a late database failure.Expected: reject fractional ratings with a clear 400 validation response before any testimonial update query.