• Mahmoud Aglan's avatar
    fix(core): a write PostgREST rejects can no longer be reported as saved · d5bedc75
    Mahmoud Aglan authored
    Database used to decode the PostgREST error body and hand it back as if it
    were the written row, so writes to missing columns (PGRST204), bad types and
    broken foreign keys came back truthy and the controller flashed success.
    Every failed request is now recorded and logged; insert/update/rpc return
    null on failure; Response::success, redirect-with-success and json refuse to
    report success over a recorded write failure and show the database's reason.
    Best-effort writes (audit trail, page-view counters, last login) go through
    Database::soft() so they cannot fail the action they describe.
    
    AuditLog had never written a row: staff ids broke the actor_id foreign key
    to profiles, names broke the resource_id uuid, and details was double
    encoded. Staff now go in admin_user_id and text ids in resource_ref
    (El3ab migrations/2026-10-26-manager-columns.sql); the audit page shows the
    admin's name and searches the text reference.
    
    Staff type times in Cairo: the app now runs in Africa/Cairo and core/Time
    converts typed times to UTC instants and back, DST included.
    Co-Authored-By: 's avatarClaude Opus 5.5 <noreply@anthropic.com>
    d5bedc75
Name
Last commit
Last update
..
ads Loading commit data...
analytics Loading commit data...
audit-log Loading commit data...
auth/views Loading commit data...
branding Loading commit data...
chess-bots Loading commit data...
dashboard Loading commit data...
economy Loading commit data...
feature-flags Loading commit data...
games Loading commit data...
live-tournaments Loading commit data...
moderation Loading commit data...
notifications Loading commit data...
org-achievements Loading commit data...
org-announcements Loading commit data...
org-applications Loading commit data...
org-challenges Loading commit data...
org-chat Loading commit data...
org-content Loading commit data...
org-events Loading commit data...
org-frames Loading commit data...
org-invites Loading commit data...
org-leaderboards Loading commit data...
org-loyalty Loading commit data...
org-media Loading commit data...
org-partnerships Loading commit data...
org-recruitment Loading commit data...
org-rosters Loading commit data...
org-spotlights Loading commit data...
org-training Loading commit data...
org-transfers Loading commit data...
org-treasury Loading commit data...
organizations Loading commit data...
players Loading commit data...
settings Loading commit data...
tournaments Loading commit data...
users Loading commit data...
workflows Loading commit data...