Skip to content

Commit f039f04

Browse files
Cannonb4llclaude
andcommitted
fix: add auth middleware to item edit route
The items/{item}/edit route was missing the authed middleware, causing a "Call to a member function items() on null" error when unauthenticated users accessed the URL. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent a182fba commit f039f04

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

routes/web.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
Route::get('projects/{project}', [ProjectController::class, 'show'])->name('projects.show');
3636
Route::get('items/{item}', [ItemController::class, 'show'])->name('items.show');
37-
Route::get('items/{item}/edit', [ItemController::class, 'edit'])->name('items.edit');
37+
Route::get('items/{item}/edit', [ItemController::class, 'edit'])->middleware('authed')->name('items.edit');
3838
Route::get('projects/{project}/items/{item}', [ItemController::class, 'show'])->name('projects.items.show');
3939
Route::get('projects/{project}/items/{item}/ai', [ItemController::class, 'ai'])->name('projects.items.ai');
4040
Route::post('projects/{project}/items/{item}/vote', [ItemController::class, 'vote'])->middleware('authed')->name('projects.items.vote');

0 commit comments

Comments
 (0)