Simplify codebase per audit of fd0529b

This commit is contained in:
Ian Gulliver
2026-10-23 09:56:40 -07:00
parent fd0529b949
commit 2bc462ada6
10 changed files with 101 additions and 219 deletions
+3 -6
View File
@@ -20,13 +20,10 @@ func (s *Server) StreamEvents(w http.ResponseWriter, r *http.Request, params api
last = *params.LastEventID
}
viewer := actor(r)
lead := params.Lead != nil && *params.Lead
taskID := ""
lead := deref(params.Lead)
taskID := deref(params.TaskId)
if params.TaskId != nil {
taskID = *params.TaskId
_, err := s.store.GetTask(r.Context(), taskID)
if err != nil {
writeStoreError(w, err)
if !s.taskExists(w, r, taskID) {
return
}
}