DUP-GO-2: identical request-validation preamble in 3 state mutation handlers #46
Labels
No labels
backend
bug
chore
duplication
effort:complex
effort:medium
effort:trivial
enhancement
frontend
fullstack
priority:high
ready-for-agent
refactor
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dries/ocman#46
Loading…
Add table
Add a link
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?
Summary
Three handlers in
internal/server/handlers_state.goshare an identical ~10-line validation preamble:handleSeenSession(lines 33–61)handleArchiveSession(lines 63–98)handlePinSession(lines 100–130)Duplicated block
All three also return
writeJSON(w, map[string]bool{"ok": true})on success.Fix
Extract the preamble into a shared helper that returns the platform string.
Effort
Trivial.