feat: Change max to 5 for cp images#35
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 45 minutes and 44 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request increases the maximum number of images allowed for a collection from 3 to 5. This change includes a database migration to update the collection schema and a corresponding update to the client-side validation logic on the creation page. Feedback suggests extending this validation to the edit page to maintain consistency across the application.
| if (pictures.length > 5) { | ||
| errorText = 'You can only upload up to 5 images'; | ||
| return; | ||
| } |
There was a problem hiding this comment.
The validation for the maximum number of images (5) should also be implemented in the edit page (website/src/routes/edit/cps/[id]/+page.svelte) to maintain consistency across the application. Currently, the edit page lacks this client-side check, which could result in a poor user experience where the backend rejects the update without immediate feedback in the UI.
No description provided.