mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-20 10:11:13 -05:00
Update documentation references
Update remaining documentation files to remove references to the old approval flow and feature flags.
This commit is contained in:
@@ -88,9 +88,10 @@ This created several issues:
|
||||
#### 3. Edge Function (`supabase/functions/process-selective-approval/index.ts`)
|
||||
|
||||
**No Changes Required:**
|
||||
- Already has comprehensive validation via `validateEntityDataStrict()`
|
||||
- Atomic transaction RPC approach already has comprehensive validation via `validateEntityDataStrict()`
|
||||
- Already returns proper 400 errors for validation failures
|
||||
- Already includes detailed error messages
|
||||
- Validates within PostgreSQL transaction for data integrity
|
||||
|
||||
## Validation Responsibilities
|
||||
|
||||
@@ -167,8 +168,9 @@ Expected: Edge function should return 400 error with detailed message, React sho
|
||||
If you need to add new validation rules:
|
||||
|
||||
1. ✅ **Add to edge function** (`process-selective-approval/index.ts`)
|
||||
- Update `validateEntityDataStrict()` function
|
||||
- Update `validateEntityDataStrict()` function within the atomic transaction RPC
|
||||
- Add to appropriate entity type case
|
||||
- Ensure validation happens before any database writes
|
||||
|
||||
2. ✅ **Update documentation schemas** (`entityValidationSchemas.ts`)
|
||||
- Keep schemas in sync for reference
|
||||
@@ -176,7 +178,7 @@ If you need to add new validation rules:
|
||||
|
||||
3. ❌ **DO NOT add to React validation**
|
||||
- React should only do basic UX validation
|
||||
- Business logic belongs in edge function
|
||||
- Business logic belongs in edge function (atomic transaction)
|
||||
|
||||
## Related Issues
|
||||
|
||||
|
||||
Reference in New Issue
Block a user