use a struct to pass multiple pieces of data into templating context

This commit is contained in:
Joel Wetzell
2026-03-04 12:38:51 -06:00
parent 6a21cc2639
commit 572a54d3b2
12 changed files with 82 additions and 46 deletions

View File

@@ -27,8 +27,10 @@ type SipDTMFResponse struct {
func (scc *SipResponseDTMFCreate) Process(ctx context.Context, payload any) (any, error) {
templateData := GetTemplateData(ctx, payload)
var digitsBuffer bytes.Buffer
err := scc.Digits.Execute(&digitsBuffer, payload)
err := scc.Digits.Execute(&digitsBuffer, templateData)
if err != nil {
return nil, err