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 -10
View File
@@ -8,13 +8,7 @@ import (
)
func (s *Server) ListInbox(w http.ResponseWriter, r *http.Request, params api.ListInboxParams) {
f := store.InboxFilter{State: api.Open}
if params.ProjectId != nil {
f.ProjectID = *params.ProjectId
}
if params.TaskId != nil {
f.TaskID = *params.TaskId
}
f := store.InboxFilter{State: api.Open, ProjectID: deref(params.ProjectId), TaskID: deref(params.TaskId)}
if params.State != nil {
f.State = *params.State
}
@@ -55,9 +49,8 @@ func (s *Server) AnswerAgain(w http.ResponseWriter, r *http.Request) {
return
}
u, err := s.store.GetUser(r.Context(), actor(r))
if err != nil {
writeStoreError(w, err)
u, ok := s.actingUser(w, r)
if !ok {
return
}