Skip to content

Instantly share code, notes, and snippets.

@dameleon
Created December 19, 2024 06:24
Show Gist options
  • Select an option

  • Save dameleon/6f096839811a048f4b51eb5cb50ea203 to your computer and use it in GitHub Desktop.

Select an option

Save dameleon/6f096839811a048f4b51eb5cb50ea203 to your computer and use it in GitHub Desktop.
## config.development.json
{
"email_confings": [
{
"key": "MAIL_TEMPLATE_U01_ORDER_COMPLETE",
"template_id": "d-47882e9c44c74572b5230b589f707584"
}
]
}
## config.production.json
{
"email_confings": [
{
"key": "MAIL_TEMPLATE_U01_ORDER_COMPLETE",
"template_id": "d-47882e9c44c74572b5230b589f707584"
}
]
}
## schema
{
"type": "object",
"properties": {
"email_configs": {
"type": "array"
"items": {
"type": "object",
"properties": {
"key": {
"type": "string"
},
"template_id": {
"type": "string",
"patterns": "^d\-[a-Z0-9]{20}$"
},
}
}
}
}
}
# app_config
for (val in email_configs) {
define(val[key], val[template_id]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment