This PR adds comprehensive photo management features, duplicate detection, attempt limits, penalty system improvements, and admin photo deletion capabilities to the MirrorMatch application. #1
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Photo Management and Game Features
Summary
This PR adds comprehensive photo management features, duplicate detection, attempt limits, penalty system improvements, and admin photo deletion capabilities to the MirrorMatch application.
Features Added
1. Duplicate Photo Detection
2. Maximum Attempts Per Photo
3. Penalty System Improvements
4. Admin Photo Deletion
5. Navigation Improvements
6. Self-Guess Prevention
Technical Changes
Database Schema
fileHashfield (String?) to Photo model for duplicate detectionmaxAttemptsfield (Int?) to Photo model for attempt limitsurlandfileHashfor performanceAPI Routes
POST /api/photos/upload-multiple: Enhanced with duplicate checking and maxAttemptsPOST /api/photos/[photoId]/guess: Added maxAttempts enforcement and score floor protectionDELETE /api/photos/[photoId]: New route for admin photo deletionComponents
DeletePhotoButton: New reusable component for photo deletionDatabase Migrations
npm run db:pushto apply schema changesnpm run db:generateto regenerate Prisma clientTesting
Breaking Changes
None - all changes are backward compatible. Existing photos will have
nullformaxAttempts(unlimited) andfileHash(for URL uploads).