refactor: extract workspace validation to middleware #13
Labels
No labels
P1
P2
P3
PHP
agent-ready
bug
clotho
discovery
docs
epic
refactor
review
security
testing
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: core/php-api#13
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Code Quality Issue
File:
src/Api/Controllers/Api/WebhookSecretController.phpProblem
The same workspace validation pattern is duplicated across 8 methods in WebhookSecretController:
Occurrences: Lines 28-32, 66-70, 104-108, 128-132, 152-156, 178-182, 206-210, 240-244
Proposed Solution
Create a new middleware
RequireWorkspacethat:Benefits:
Implementation
Then apply to route group or individual controller methods.
Priority
Medium - Code quality improvement, not a bug