Skip to content

Commit 7f3a517

Browse files
authored
fix: update kratos http courier jsonnet template sample (#1715)
Update 03_mail-courier-http.mdx
1 parent dd7f4c3 commit 7f3a517

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/kratos/self-hosted/03_mail-courier-http.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,14 @@ A universal Jsonnet template that works with all flows, would look like this:
7575

7676
```jsonnet
7777
function(ctx) {
78-
recipient: ctx.Recipient,
79-
template_type: ctx.TemplateType,
80-
name: if "TemplateData" in ctx && "Identity" in ctx.TemplateData && "Name" in ctx.TemplateData.Identity then ctx.TemplateData.Identity.Name else null,
81-
to: if "TemplateData" in ctx && "To" in ctx.TemplateData then ctx.TemplateData.To else null,
82-
recovery_code: if "TemplateData" in ctx && "RecoveryCode" in ctx.TemplateData then ctx.TemplateData.RecoveryCode else null,
83-
recovery_url: if "TemplateData" in ctx && "RecoveryURL" in ctx.TemplateData then ctx.TemplateData.RecoveryURL else null,
84-
verification_url: if "TemplateData" in ctx && "VerificationURL" in ctx.TemplateData then ctx.TemplateData.VerificationURL else null,
85-
verification_code: if "TemplateData" in ctx && "VerificationCode" in ctx.TemplateData then ctx.TemplateData.VerificationCode else null,
78+
recipient: ctx.recipient,
79+
template_type: ctx.template_type,
80+
name: if "template_data" in ctx && "identity" in ctx.template_data && "name" in ctx.template_data.identity then ctx.template_data.identity.name else null,
81+
to: if "template_data" in ctx && "to" in ctx.template_data then ctx.template_data.to else null,
82+
recovery_code: if "template_data" in ctx && "recovery_code" in ctx.template_data then ctx.template_data.recovery_code else null,
83+
recovery_url: if "template_data" in ctx && "recovery_url" in ctx.template_data then ctx.template_data.recovery_url else null,
84+
verification_url: if "template_data" in ctx && "verification_url" in ctx.template_data then ctx.template_data.verification_url else null,
85+
verification_code: if "template_data" in ctx && "verification_code" in ctx.template_data then ctx.template_data.verification_code else null,
8686
}
8787
8888
```

0 commit comments

Comments
 (0)