Commit Graph
2 Commits
Author SHA1 Message Date
rootandClaude Sonnet 5 221493e56f Fix two live 500s: favorite toggle and admin exercise creation
FavoriteController's constructor called $this->middleware('auth'),
which no longer exists on Laravel 12's base Controller (removed in the
framework's slimmer controller base). Every favorite-toggle request was
500ing. The routes already sit inside a Route::middleware('auth') group
in web.php, so the constructor was both redundant and broken - removed it.

Separately, exercises.exercise_db_id was NOT NULL with a unique
constraint, but the admin "create exercise" form never set it (that
column only gets populated by the fetch:exercise importer). Creating an
exercise by hand through the admin UI has been broken since it was
built. Made the column nullable.

Both found by adding feature test coverage, not by manual testing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-10 11:47:44 +03:00
root 1ed9235451 favorites 2025-10-02 23:52:07 +03:00