补齐三类日志的触发操作和结果并完善运行事件展示
Security Checks / security (push) Waiting to run

This commit is contained in:
xuans committed 2026-09-09 02:48:07 +08:00
1 parent b50e5bdfa2
commit dd6258c98b
34 files changed
+734 -87

No files matched your search

+7
View File
@@ -31,6 +31,13 @@ func (p *Response) FPrint(w http.ResponseWriter) {
if observer, ok := w.(interface{ ObserveResult(int) }); ok {
observer.ObserveResult(p.ErrorNo)
}
// 仅通知经过业务确认的中间状态,不向日志观察器传递响应载荷或验证凭据。
if observer, ok := w.(interface{ ObservePending(bool) }); ok && p.ErrorNo == 0 {
if data, ok := p.Data.(map[string]any); ok {
pending, _ := data["pending"].(bool)
observer.ObservePending(pending)
}
}
w.Header().Set("Content-Type", "application/json; charset=utf-8")
if _, err := w.Write(bytesData); err != nil {
log.WithError(err).Error("write HTTP response failed")