(ctx context.Context, in *rejectInput)
| 145 | } |
| 146 | |
| 147 | func (s *Server) handleReject(ctx context.Context, in *rejectInput) (*rejectOutput, error) { |
| 148 | // Account-owner action — see handleApprove. Rejecting (discarding) a held |
| 149 | // draft is part of the HITL decision, so it is also account-scope only. |
| 150 | p, err := s.requireAccountScope(ctx) |
| 151 | if err != nil { |
| 152 | return nil, err |
| 153 | } |
| 154 | ag, err := s.resolveOwnedAgent(ctx, in.Address) |
| 155 | if err != nil { |
| 156 | return nil, err |
| 157 | } |
| 158 | view, err := s.rejectHeld(ctx, p.User.ID, in.ID, ag.Email, in.Body.Reason) |
| 159 | if err != nil { |
| 160 | return nil, err |
| 161 | } |
| 162 | return &rejectOutput{Body: view}, nil |
| 163 | } |
| 164 | |
| 165 | // rejectHeld is the shared reject dispatch (agent-path + /reviews). Caller MUST |
| 166 | // have proven account scope + ownership of agentEmail. Inbound holds are dropped |
nothing calls this directly
no test coverage detected