Fixes 'invalid input syntax for type uuid' error when writing ticket
workflow audit logs. The audit Event.ID field was using fmt.Sprintf
with nanoseconds ('wf-%d') which doesn't match PostgreSQL's uuid type.
Also adds uuid import to ticket_workflow.go.
Verified: full chain webhook→assign→resolve→close produces 3 audit
logs correctly, no more 'invalid uuid' errors in logs.
12 lines
259 B
Go
12 lines
259 B
Go
package handlers
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/bridge/ai-customer-service/internal/http/middleware"
|
|
)
|
|
|
|
func withActor(req *http.Request, actorID, role string) *http.Request {
|
|
return req.WithContext(middleware.WithActor(req.Context(), actorID, role))
|
|
}
|